home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / prospero / doc / prospero-protocol-v5.tex.Z / prospero-protocol-v5.tex (.txt)
Encoding:
LaTeX Document  |  1993-11-30  |  103.4 KB  |  2,016 lines

  1. % If you somehow got this file without fullpage.sty,  delete
  2. % ``fullpage'' from the list of style options.  It just pulls out the
  3. % margins a bit.
  4. \documentstyle[11pt,twoside,fullpage]{report}
  5. % New commands
  6. %-------------
  7. % for meta-symbols
  8. \newcommand{\meta}[1]{{\bf \mbox{\(<\)#1\(>\)}}}
  9. % for literal tokens. 
  10. \newcommand{\lit}[1]{{\tt \mbox{#1}}}
  11. %for attributes
  12. \newcommand{\atr}[1]{\mbox{\sc #1}}
  13. % for identifying text
  14. \newcommand{\text}[1]{{\em #1}\/}
  15. % Start and end of One or More
  16. \newcommand{\ooms}{\([\,\)}
  17. \newcommand{\oome}{\(\,]^+\)}
  18. % start and end of zero or more
  19. \newcommand{\zoms}{\([\,\)}
  20. \newcommand{\zome}{\(\,]^*\)}
  21. % Start and end of zero or one
  22. \newcommand{\zoos}{\([\,\)}
  23. \newcommand{\zooe}{\(\,]\)}
  24. % start an OR
  25. \newcommand{\ors}{{\bf (\,}}
  26. \newcommand{\ore}{{\bf \,) }}
  27. \newcommand{\metaor}{{\em \,or\, }}
  28. \newcommand{\hexnum}[1]{\(\mbox{#1}_{16}\)}
  29. \newcommand{\unix}{{\sc unix}}
  30. \newcommand{\selectlines}{\zoms\meta{LF} \\ \lit{SELECT} \meta{applies-to}
  31.     \ors\lit{FIELD} \metaor \lit{INTRINSIC}
  32.      \metaor \lit{APPLICATION}\ore \meta{attribute-name} 
  33.         \meta{attribute-value-type}\ore
  34.      \zoms\meta{value-tuple-element}\zome\zome}
  35. \newenvironment{command}{\begin{verse}\sloppy}{\end{verse}}
  36. \newcommand{\commandsize}{\large}
  37. %\newtheorem{example}{Example}
  38. % Uncomment this for almost-double spacing
  39. %\renewcommand{\baselinestretch}{1.7}
  40. %\newcommand{\hozline}{\rule{\textwidth}{0.3mm}}
  41. %\newcommand{\hozline}{\makebox[\textwidth]{\hrulefill}}
  42. %\newcommand{\bex}{\begin{example} \begin{rm}}
  43. %\newcommand{\eex}{$\Box$ \end{rm} \end{example}}
  44. %\newcommand{\cbs}{\chgbarbegin}
  45. %\newcommand{\cbe}{\chgbarend}
  46. %\newcommand{\cbs}{}
  47. %\newcommand{\cbe}{}
  48. %\newcommand{\ptag}{\begin{flushright} {\rm ($P$)} \end{flushright} }
  49. \begin{document}
  50. \pagenumbering{arabic}
  51. \pagestyle{plain}
  52. \renewcommand{\thepage}{\arabic{page}}
  53. %\title{The Prospero Protocol, version 5\thanks{
  54. %    This research was supported in part by the National Science
  55. %    Foundation (Grant No. CCR-8619663), the Washington Technology Center,
  56. %    Digital Equipment Corporation, and the Defense Advanced Research
  57. %    Projects Agency under NASA Cooperative Agreement NCC-2-539}
  58. %\author{B. Clifford Neuman\thanks{
  59. %    To Contact the Authors: \protect\\
  60. %Electronic Mail: \protect\mbox{\protect\verb"info-prospero@isi.edu"} \\
  61. %    Telephone: +1 (310) 822-1511 \protect\\
  62. %    Mail: USC Information Sciences Institute \\
  63. %    4676 Admiralty Way \\
  64. %  Marina del Rey, California  90292--6695 U.S.A. }
  65. % \and Steven Seger Augart
  66. %\and   Information Sciences Institute \\
  67. %    University of Southern California
  68. %\date{
  69. %\maketitle
  70. \begin{titlepage}
  71. \renewcommand{\thefootnote}{}
  72. \footnotetext{\hspace*{-21pt}
  73. Digital copies of the latest revision of this document may be obtained
  74. through Prospero as
  75. \mbox{\verb"/papers/subjects/operating-systems/prospero/doc/protocol.PS.Z"},
  76. in the \mbox{\tt \#/INET/EDU/ISI/swa} virtual system, or through
  77. Anonymous FTP from \mbox{\tt PROSPERO.ISI.EDU} as
  78. \mbox{\verb"/pub/prospero/doc/prospero-protocol.PS.Z"}
  79. \footnotetext{\hspace*{-21pt}
  80. This work was supported in part by the National Science
  81. Foundation (Grant No. CCR-8619663), the Washington Technology Center,
  82. Digital Equipment Corporation, and the Defense Advance Research
  83. Projects Agency under NASA Cooperative Agreement NCC-2-539.
  84. The views and conclusions contained in
  85. this document are those of the authors and should not be interpreted as
  86. representing the official policies, either expressed or implied, of
  87. any of the funding agencies.
  88. The authors may be reached
  89. at USC/ISI, 4676 Admiralty Way, Marina del Rey, California\ \ 90292-6695, USA.
  90. Telephone +1 (310) 822-1511, email \mbox{\verb"info-prospero@isi.edu"}.  }
  91. \renewcommand{\thefootnote}{\arabic{footnote}}
  92. \vspace*{\fill}
  93. \begin{center}
  94. \LARGE The Prospero Protocol\\
  95. \Large Version 5\\
  96. \vskip 1.5em
  97. {\large Draft of 12 June 1993} \\
  98. {\large Document Revision No. 0.3} \\
  99. \end{center}
  100. \vspace{.5in}
  101. \Large \hspace*{\fill} B. Clifford Neuman
  102. %\footnotetext{\hspace*{-18pt}
  103. %    To Contact the Authors: \\
  104. %    Electronic Mail: \mbox{\verb"info-prospero@isi.edu"} \\
  105. %    Telephone: +1 (310) 822-1511 \\
  106. %    Mail: USC Information Sciences Institute, 4676 Admiralty Way,
  107. %  Marina del Rey, California  90292--6695\ \ U.S.A.
  108. \hfill Steven Seger Augart \hspace*{\fill} \\
  109. \vspace{.2in}
  110. \begin{center}
  111. \Large Information Sciences Institute \\
  112. University of Southern California
  113. \end{center}
  114. \vspace*{1.2in}
  115. \vspace*{\fill}
  116. \end{titlepage}
  117. \tableofcontents
  118. \chapter{Introduction}
  119. This document describes version 5 of the Prospero protocol.
  120. Communication with directory servers uses a reliable delivery protocol
  121. described in Appendix~\ref{ardp}.
  122. Requests and responses are human readable commands and multiple
  123. commands may be sent in a single message.
  124. Prospero is implemented on top of a message-based protocol to reduce the
  125. overhead that would otherwise be incurred when establishing
  126. connections to multiple directory servers.  The decision to use a
  127. message protocol directly, instead of through a higher level
  128. mechanism such as remote procedure call, was made for reasons of
  129. portability.  We did not want Prospero to depend on another protocol,
  130. software package, or other resource, unless that resource was almost
  131. universally supported by every computer on the Internet.
  132. The use of humanly readable commands in the protocol has several
  133. advantages. It eliminates problems with byte ordering, and it makes
  134. future changes or additions to the protocol easier to incorporate
  135. while maintaining compatibility across versions; new commands or
  136. additional options to existing commands can be easily added.
  137. The ability to request multiple operations in a single message
  138. improves performance, and it provides a simple way to request that a
  139. collection of operations (on a single server) be performed atomically.
  140. The concept of an ``attribute'' appears frequently in the following
  141. command description.  For a discussion of attributes, read
  142. appendix~\ref{db} of this document.
  143. \section{Additional Documents}
  144. The Prospero documentation series will include the following:
  145. \begin{description}
  146. \item[Prospero Protocol Specification]  You're reading it.  Right now,
  147. this is the most current document we have, but it will eventually be
  148. re-targeted towards a more specialized audience when the other guides
  149. in the series are written and revised.
  150. \item[Prospero System User's Guide]  This will describe the general
  151. features of the Prospero system that will be common to almost all user
  152. interfaces, such as ACL types and filters.
  153. \item[Prospero Command-Line Client User's Guide] Describes the
  154. command-line client package; this is the client that's been shipped
  155. with all Prospero releases.
  156. \item[Prospero Gopher Client User's Guide]  This describes the
  157. Gopher menu-based client package, which is in progress.
  158. %\item[Prospero World-Wide Web Client User's Guide]  This describes the
  159. %World-Wide Web hypertext client package, which hasn't yet been written
  160. %but is going to be done Real Soon Now.
  161. \item[Prospero Programmer's Manual] This describes the \lit{pfs}
  162. and \lit{pcompat} libraries, which Prospero applications programmers
  163. use to interface with Prospero.
  164. \end{description}
  165. \chapter{Command Introduction}
  166. \section{Spaces, quoting, and line-feeds}
  167. Prospero messages are divided into lines.  Lines are divided into
  168. tokens.  Commands and lines sent in response are separated by an
  169. unquoted {\sc ASCII} \meta{LF} character.
  170. Within a line, tokens are separated by unquoted horizontal whitespace
  171. (one or more {\sc ASCII} spaces and/or tabs).  Client and server
  172. implementations are not required to accept lines which begin or end
  173. with horizontal whitespace, but are encouraged to do so.  Similarly,
  174. implementations are encouraged to accept \meta{CR} or
  175. \meta{CR}\meta{LF} as alternative acceptable line terminators, but are
  176. not required to do so. 
  177. % ``Be conservative in what you send, generous
  178. %in what you accept.'' (J. Postel)
  179. Special characters within a command token, or null tokens, can be
  180. quoted using single quotes (\lit{'}). 
  181. While inside quotes, a quote can be included by doubling it.  The only
  182. character that cannot be quoted is the ASCII null character
  183. (character code zero; \verb"'\0'" for C programmers).  This is really
  184. a limitation of the server implementation, which passes Prospero
  185. packets, commands, and tokens around internally as null-terminated
  186. C strings.\footnote{If you wish to send binary data around, we
  187. recommend that you
  188. encode it into a null-less form using the \lit{pfs} library's
  189. \lit{binencode()} and \lit{bindecode()} routines.}
  190. Any token may be quoted (although most will not need quoting), except
  191. for literal command tokens (\lit{VERSION}, \lit{ID}, etc.).
  192. Also, the \meta{multi-component} token uses the quoting system in a
  193. special way --- see the \lit{LIST} command for details.
  194. \section{Options}
  195. Many Prospero Protocol commands take options.  If multiple options are
  196. to be specified for a single command, the options are separated by a
  197. ``\lit{+}''.  If no options are specified, then the null string should be
  198. sent to indicate this.  The null string will need to be quoted, like
  199. so: \lit{'{}'}
  200. \section{Metasyntax}
  201. In this document, we will use some meta-syntactic features to describe
  202. commands.  Literal tokens (such as \lit{LITERAL-TOKEN}) appear in a
  203. typewriter font.  Non-terminals look like this: \meta{non-terminal}.
  204. The line-feed, carriage-return, and space characters are represented
  205. as \meta{LF}, \meta{CR}, and \meta{SPC}, respectively.  Alternation
  206. (choice among two or more possibilities) looks like:
  207. \ors\meta{option1} \metaor \meta{option2} \ore
  208.   We also use
  209. the following meta-syntactic constructs:
  210. %\begin{table}[htb]
  211. \begin{center}
  212. \begin{tabular}{|c|c|l|}  \hline 
  213. \multicolumn{3}{|c|}{Metasyntax used to describe commands} \\ \hline
  214. Start   & End       & \multicolumn{1}{c|}{Meaning} \\ \hline
  215. [       & ]        & One or zero repetitions. \\ \hline
  216. [       & \(]^*\)    & Zero or more repetitions. \\ \hline
  217. [       & \(]^+\)    & One repetition or more. \\ \hline
  218. \end{tabular}
  219. \end{center}
  220. %\end{table}
  221. \section{Objects}
  222. A Prospero object is anything to which a normal link (\meta{link-type} =
  223. \lit{L}) can be made, except for \lit{EXTERNAL} objects.  
  224. \subsection{Base Type\label{base type}}
  225. Every Prospero object has one or more base types associated with it.  
  226. All Prospero objects have a base type of OBJECT.  This means that they
  227. can have attributes attached to them.  In addition, objects with a base
  228. type of FILE can store data, and objects with a base type of DIRECTORY
  229. can store directory information. 
  230. \begin{sloppypar}
  231. The base type of a Prospero object is accessible
  232. through the \atr{base-type} intrinsic attribute.  The primitive
  233. value for \atr{base-type} is \lit{OBJECT}.  If an object's
  234. \atr{base-type} attribute has a value of %\linebreak[3]
  235. \lit{OBJECT+FILE+DIRECTORY}, 
  236. then the object can have attributes attached to it, can contain data,
  237. and can contain links.  As a shorthand, since all objects have
  238. \lit{OBJECT} as one of their base types, an object with more than one
  239. base type can have the \lit{OBJECT} implied, so that the \atr{base-type}
  240. value \lit{OBJECT+FILE+DIRECTORY} is equivalent to the value
  241. \lit{FILE+DIRECTORY} and the value \lit{FILE} is equivalent to the 
  242. value \lit{FILE+OBJECT}.  The order of values in the \atr{base-type}
  243. attribute is unimportant, so \lit{DIRECTORY+FILE} is equivalent to
  244. \lit{FILE+DIRECTORY}.
  245. \end{sloppypar}
  246. In the rest of this document, when
  247. we say ``directory,'', we mean ``an object which has
  248. \lit{DIRECTORY} as part of its \atr{base-type}.''  When we say ``file,''
  249. we mean ``an object which has \lit{FILE} as part of its \atr{base-type}.''
  250. One may use \lit{EDIT-OBJECT-INFO} to edit the \atr{base-type}
  251. attribute to remove the \lit{FILE} type from it only if the file is
  252. empty (zero length), and one may remove the \lit{DIRECTORY} type from
  253. it only if the directory is empty (contains no links).  To add a type
  254. to the \atr{base-type}, one must use the \lit{ADD} option to
  255. \lit{CREATE-OBJECT}.  
  256. \subsection{Host-Specific Object Names ({\sc hsoname}s)}
  257. Every Prospero object has an
  258. \meta{hsoname}.  {\sc hsoname}s are not guaranteed to be unique across time; if
  259. an object is deleted, 
  260. a new
  261. object may be created that re-uses the old object's handle.  However,
  262. at any particular moment, two Prospero objects on the same server are
  263. guaranteed to have unique hsonames, unless they are different versions
  264. of the same object (i.e., unless their \atr{version-number} fields are
  265. different.)
  266. Two objects on different servers might have identical
  267. hsonames.  
  268. In the current server implementation, the \meta{hsoname-type} is always 
  269. \lit{ASCII} and the \meta{hsoname} is almost always a full
  270. (i.e., starting with a slash (\lit{/})) \unix\ 
  271. filesystem pathname.  See appendix~\ref{conventions} for more
  272. discussion of this.
  273. The \meta{hsoname-type} token exists because some special
  274. filesystems may have non-\lit{ASCII} \meta{hsoname}s.
  275. \subsection{Versions\label{object version numbers}}
  276. We intend to allow versioned objects.  All objects, including
  277. directories,  have a
  278. \atr{version-number} field.  In the current server
  279. implementation, the \atr{version-number} field is always zero, which means
  280. ``unversioned''.  It need not be in future server implementations.  
  281. In commands and responses, providing a zero value for the
  282. \meta{object-version} token means to retrieve the current version of
  283. the object.  Specifying explicit values means that a particular
  284. version of the object is required.  Explicit object version numbers
  285. (when they are established) will always be positive integers.
  286. \subsection{Object \lit{ID} fields}
  287. The \lit{ID} field is a unique (or nearly unique)
  288. identifier for an object.  If the underlying object changes (such as
  289. by editing), then some types of \lit{ID}s will change and
  290. others will not.  If two
  291. objects have the same \lit{ID}, then they are considered by Prospero
  292. to be the same object.  This is useful for distinguishing between two
  293. cases: (a) two 
  294. links which happen to have the same \meta{name-component} but
  295. different storage locations (a different host and handle pair), and which
  296. do not actually represent the same object, and (b) two links which have the
  297. same \meta{name-component} and same \lit{ID}, but possibly different storage
  298. locations --- in case (b), the  objects are replicas and the client
  299. should access whichever one it 
  300. chooses to.  (Code is currently under development to enable
  301. servers to return a list of replicas in order of nearness to
  302. the client.)  Two links with the same \meta{name-component} and no
  303. \lit{ID} specification are considered by Prospero to be different
  304. objects, not replicas of one another.
  305. A problem with the \lit{ID} field is that there is not an accepted
  306. standard for universal document identifiers.  An IETF working group has
  307. been formed to consider such identifiers, and the \lit{ID}
  308. field exists in anticipation of their eventual agreement upon a standard.
  309. We expect that there will be more than one type of universal document
  310. identifier; therefore, there will be more than one \meta{id-type}.
  311. Prospero supports objects with several possible \lit{ID}s.%
  312. \footnote{This will go into the user's manual when we revise it.  The
  313.   user-level names for two links distinguished only by their \lit{ID}
  314.   fields are: 
  315.   \begin{command}
  316.     \ors\meta{name-component}\lit{\#}\lit{\#}\(\mbox{\meta{id-type}}_1\)\lit{\#}\(\mbox{\meta{id-value-token}}_{1,1}\)\lit{\#}\(\mbox{\meta{id-value-token}}_{1,2}\)\ldots % permit a line break here
  317.     \lit{\#}\lit{\#}\(\mbox{\meta{id-type}}_2\)\lit{\#}\(\mbox{\meta{id-value-token}}_{2,1}\)\lit{\#}\(\mbox{\meta{id-value-token}}_{2,2}\)\ldots \\
  318.   \metaor \meta{name-component}\lit{\#}\(\mbox{\meta{id-value-token}}_1\)\lit{\#}\meta{id-value-token$_2$}\ldots \ore
  319.   \end{command}
  320. The second form matches any \meta{id-type}.  The first form is used to
  321. explicitly specify one or more \meta{id-type}s.
  322. For now, there are only two \meta{id-type}s defined.  The \lit{REMOTE}
  323. \meta{id-type} is used by the server when it has magic
  324. knowledge (perhaps through a local database) that
  325. two objects are the same.  The  \lit{REMOTE} id type is a single
  326. element which is the printed decimal representation of a positive
  327. integer.  This positive integer should be able to be stored in a 32
  328. bit integer.  A \lit{REMOTE} id value of 0 means ``unspecified''.
  329. The \lit{REMOTE} 
  330. \meta{id-type} cannot be sent across the network by clients in
  331. queries.%
  332. \footnote{The \meta{id-value} of the \lit{REMOTE} type
  333. is the same as the \meta{magic-no} token specified in version 1 of the
  334. Prospero protocol.}  It is not guaranteed to be consistent across different 
  335. queries to the server, but server implementors are encouraged to make
  336. the \meta{id-value} token consistent across queries. 
  337. Many clients will locally generate \lit{ID} fields to
  338. help the human user differentiate between conflicting links.  These
  339. \lit{ID} fields will have an \meta{id-type} of \lit{LOCAL} and an
  340. arbitrarily generated string as their \meta{id-value}.  They may not be
  341. sent over the network, and are not guaranteed to be unique from
  342. directory read to directory read, although implementors are encouraged
  343. to make them so.  All available \lit{ID} fields will be returned with
  344. every \lit{LIST} operation.  
  345. \chapter{Commands Reference}
  346. All Prospero commands are listed below.
  347. \section{VERSION}
  348. \begin{command}
  349.  \commandsize \lit{VERSION} \meta{version-number} 
  350.     \zoos\meta{software-identifier}\zooe
  351. \end{command}
  352. This command requests or specifies the protocol version number.  If
  353. the specified protocol version number is not supported, the response
  354. will be:
  355. \begin{command}
  356.  \lit{VERSION-NOT-SUPPORTED TRY} \meta{min-version-number}\lit{-}\meta{max-version-number}
  357. \end{command}
  358. \begin{command}
  359.   \lit{VERSION-NOT-SUPPORTED TRY} \meta{version-number}
  360. \end{command}
  361. Where \meta{version-number} or
  362. \meta{min-version-number}\lit{-}\meta{max-version-number} are those
  363. versions that are supported.   
  364. If no arguments are supplied (or if the argument is not a 
  365. number), then the \lit{VERSION} command will return the current
  366. protocol version number being used by the server in the form:
  367. \begin{command}
  368.   \lit{VERSION} \meta{version-number} \zoos\meta{software-identifier}\zooe 
  369. \end{command}
  370. If the \meta{software-identifier} is specified, it identifies
  371. the software and version of the software that is generating the
  372. message.\footnote{Software developers wishing to obtain software
  373. identifiers should send electronic mail to {\tt pfs-administrator@isi.edu}.}
  374. \section{AUTHENTICATE}
  375. \begin{command}
  376.   \commandsize \lit{AUTHENTICATE} \meta{options} \meta{authenticator-type}
  377.     \meta{authentication-data} \zoms\meta{principal-name}\zome
  378. \end{command}
  379. This command authenticates the principal making the request.  The
  380. \meta{authenticator-type} is the type of the authenticator.  It might
  381. be a password, a Kerberos 
  382. authenticator, or data used by an alternative authentication
  383. mechanism.  The currently supported values for
  384. \meta{authenticator-type} are \lit{UNAUTHENTICATED}, \lit{KERBEROS},
  385. and \lit{HANDLE}.
  386. If the \meta{authenticator-type} is \lit{UNAUTHENTICATED}, this is
  387. honored by the \lit{ASRTHOST} ACL type.  It is also honored by the \lit{TRSTHOST} ACL
  388. type if the client is
  389. using a privileged port.  If the \meta{authenticator-type} is 
  390. \lit{UNAUTHENTICATED}, then the \meta{authentication-data} should be
  391. the username of the user running the client.  This username is be the
  392. principal referred to by the ACL.  
  393. If the \meta{authenticator-type} is \lit{KERBEROS}, then the
  394. \meta{authentication-data} is a Kerberos authentication message
  395. authenticating the 
  396. principal to the Prospero server.  The ACL principal will be the same as the
  397. Kerberos principal.  The ACL type will be \lit{AUTHENT} \lit{KERBEROS}.
  398. If the \meta{authenticator-type} is \lit{HANDLE}, then the
  399. \meta{authentication-data} is a handle returned in response to a
  400. previous \lit{AUTHENTICATE} command.  
  401. The optional \meta{principal-name}s are informational only for some
  402. authentication types, and exist only for human convenience.  The
  403. server will extract the principal names from the
  404. \meta{authentication-data}, but the names might be encrypted in the
  405. \meta{authentication-data} or otherwise represented in a way that
  406. humans cannot easily decipher them.  (For instance, this is the case
  407. with Kerberos version 5.)  In the case of the \lit{P\_PASSWORD}
  408. authentication type, the \meta{principal-name}s are not optional.
  409. More than one \lit{AUTHENTICATE} command may be sent in a single
  410. message.  This can be used both to authenticate oneself as multiple
  411. simultaneous principals and to authenticate oneself using several methods.
  412. The response may take one of several forms.  If the authentication
  413. fails, then the response is:
  414. \begin{command}
  415. \lit{FAILURE} \lit{AUTHENTICATION-DATA} \zoos\text{explanatory text}\zooe
  416. \end{command}
  417. One might get this response if an authentication handle has expired.
  418. If it is computationally expensive for the server to validate the
  419. authentication data, it may want to cache the fact that the data has
  420. been validated, and return a handle that the client may use in future
  421. requests to the server:
  422. \begin{command}
  423. \lit{AUTHENTICATED} \zoos\meta{authentication-handle} 
  424.  \zoos\meta{handle-expiration-time}\zooe \zooe
  425. \end{command}
  426. The \meta{handle-expiration-time}, if provided, is in ASN-TIME format.
  427. The response may be another \lit {AUTHENTICATE} command if the server
  428. needs to authenticate itself to the client.\footnote{XXX: Not
  429. currently implemented.}  The response may simply be:
  430. \begin{command}
  431.         \lit{AUTHENTICATED}
  432. \end{command}
  433. to indicate that the authentication succeeded.  If other commands are
  434. included in the same packet as the \lit{AUTHENTICATE} request (this
  435. will almost always be the case), then successful execution of theose
  436. other commands implies that the authentication succeeded; in this case,
  437. the server is not required to include the \lit{AUTHENTICATED} response.
  438. Currently, no options are defined, so the \meta{options} token is
  439. always the null string.
  440. \section{DIRECTORY}
  441. \begin{command}
  442.   \commandsize \lit{DIRECTORY} \meta{hsoname-type} \meta{hsoname}
  443.     \zoos\meta{object-version}\zooe \selectlines
  444. \end{command}
  445. This command specifies the directory to be read or modified by the
  446. commands that follow as part of the same request.  This command
  447. does not generate a response unless the selected directory is not a
  448. directory.  In that case, the response:
  449. \begin{command}
  450.   \lit{FAILURE NOT-A-DIRECTORY}
  451. \end{command}
  452. is returned, and the remainder of the request ignored.
  453. \section{ATOMIC}
  454. \begin{command}
  455.   \commandsize \lit{ATOMIC}
  456. \end{command}
  457. This command specifies that all commands that follow are to be
  458. completed atomically.  If one of the commands fails, then none of the
  459. commands are to have an effect.  This may require undoing the effects
  460. of commands which have already completed.  Note that this command works
  461. only for requests issued in the same message, and all commands must
  462. be executable on the single server to which the message was sent.
  463. This command is not currently implemented.
  464. \section{LIST}
  465. \begin{command}
  466.   \commandsize \lit{LIST} \meta{options} \lit{COMPONENTS}
  467.     \zoms\meta{name-component}\zome\selectlines\meta{LF}\\
  468.     \lit{FILTER} ... 
  469. \end{command}
  470. \lit{LIST} is used to look up information stored in a directory.  It
  471. must be preceded by a \lit{DIRECTORY} command in the same request.  Each
  472. optional \meta{name-component} is a component of a
  473. multiple-component name relative to the directory specified in the
  474. \lit{DIRECTORY} command.  The last component may include wildcards.  If no
  475. \meta{name-component} is specified, the wildcard ``*'' is implied
  476. (i.e., all listable components in the directory will be listed).\footnote{
  477. The protocol is currently in transition.  The old format was as
  478. follows:
  479. Multiple component names are allowed, and are specified as a single
  480. token following the \meta{name-component}.  The multiple components within
  481. a single name are separated by the unquoted slash (\lit{/}).  Servers
  482. and clients for now are accepting both versions of the protocol
  483. message, which means that the 1st component of a multiple-component
  484. name must be quoted if it contains a slash.}
  485.   If the result of
  486. the lookup of one component is another directory at the same storage
  487. site, then the directory server will repeat the process and look up
  488. the next component.  When a lookup results in a dead-end, or a
  489. directory at another site, the server will return an \lit{UNRESOLVED}
  490. message, indicating which components remain to be resolved by the client.
  491. If a space, tab, slash, or \meta{LF} is to be included in a component
  492. of a single-component or multi-component name, the component must be
  493. quoted.  Quoting a slash in a single-component or multi-component name
  494. means that the slash is not considered to separate components of a
  495. multi-component name, but rather to be a part of a single component.
  496. This somewhat awkward syntax allows us to have single components
  497. which contain slashes or horizontal whitespace or \meta{LF}s.
  498. \subsection{Wildcards}
  499. The \meta{name} tokens in the \lit{LIST} command are the
  500. only places in the Prospero protocol where components may be specified
  501. with wildcards.    There are two wildcard characters supported:
  502. \begin{description}
  503. \item[\lit{*}] Match zero or more characters.   
  504. \item[\lit{?}] Match exactly one character.  
  505. \end{description}
  506. Wildcards may only be used to expand at a single-component level; by
  507. this, we mean that the wildcarded \meta{name}
  508. \lit{foo?bar} would match the single-component name whose name in
  509. the current directory was \lit{foo-bar},
  510. but would not match the object whose multiple-component name in the
  511. current directory was \verb"foo/bar".
  512. One may also wildcard a name by giving a full regular expression.  To
  513. do this, the regular expression should be enclosed within parentheses.
  514. For instance, specifying (Anne.*) is equivalent to specifying the
  515. wildcarded name 'Anne*'.  
  516. In addition to any wildcards specified, a literal match for the
  517. wildcard will also happen.
  518. \subsection{Options}
  519. \meta{options} contains a (possibly empty) list of options to the
  520. \lit{LIST} command.  If no options are specified, an empty
  521. list of options should be sent as
  522. a null token (\lit{'{}'}.)
  523. \subsubsection{Miscellaneous Options}
  524. Among the options supported are \lit{EXPAND} which tells the remote directory
  525. server to expand any union entries in the directory.  By default, the
  526. response will contain the names of union links to be included, and the
  527. client must submit a new query.  A directory server can ignore the
  528. \lit{EXPAND} option to the list command if it so desires.  The \lit{LEXPAND}
  529. option is the same as \lit{EXPAND}, but indicates that the server should
  530. only expand union entries for local directories.  The \lit{LEXPAND} option
  531. is implied if a multiple component name is being resolved.
  532. The \lit{VERIFY} option tells the remote server that the purpose of the
  533. query is to verify whether the remote directory exists and is a
  534. directory.  No components are to be returned; instead, the message
  535. returned on success is \lit{NONE-FOUND}.
  536. \subsubsection{\protect\lit{ATTRIBUTES} option}
  537. The \lit{ATTRIBUTES} option indicates that the attributes associated with
  538. the link are to be returned.  (If the object is on the same host as
  539. the directory, then the server may ignore CACHED attributes and return
  540. OBJECT attributes instead.
  541.   \lit{ATTRIBUTES} is optionally immediately
  542. followed by an argument list, which is a parenthesized \mbox{\lit{+}-se}para\-ted
  543. list of attributes to be 
  544. returned.  If the \lit{ATTRIBUTES} option is specified without any
  545. attributes requested, then it is just the same as if one had specified
  546. \lit{ATTRIBUTES(\#INTERESTING)}.  Note that union links do not
  547. normally have any interesting attributes attached to them, except
  548. for \lit{FILTER}.
  549. \lit{ATTRIBUTES(ID+FILTER)} is always implied.  For \lit{EXTERNAL}
  550. links, \lit{ATTRIBUTES(ACCESS-METHOD)} is always implied.\footnote{
  551.     This restriction seems odd, but it makes certain details of
  552. programming the client libraries much easier.} 
  553. There are some special arguments to the
  554. \lit{ATTRIBUTES} option.  It is not a good idea for application-defined
  555. attributes to have names that conflict with these special arguments; if
  556. there are such application-defined attributes, you may have to use the
  557. \lit{\#ALL} special argument to look at their values.  More than one
  558. special argument may be specified, and one may mix special and
  559. non-special arguments.  Also, note that it is never erroneous
  560. for a server to return more attributes
  561. than were asked for, nor is it erroneous for a server to return
  562. attribute information even if no \lit{ATTRIBUTES} option was specified
  563. to the \lit{LIST} command.  A server that always behaved as if the
  564. \lit{ATTRIBUTES(\#ALL)} option were specified would be behaving
  565. legally, although it would not be terribly efficient. 
  566. \begin{description}
  567.   \item[\lit{\#INTERESTING}] Return only interesting attributes.  What
  568.     constitutes an ``interesting'' attribute is server-dependent.
  569.     This allows one to use Prospero for special applications.
  570.   \item[\lit{\#ALL}] If this argument is specified, and the object resides
  571. on the same host as 
  572. the link, then the attributes stored with the object referenced by the
  573. link will be returned in addition to those stored with the link, and
  574. no cached attributes will be returned (they would be irrelevant).  If
  575. the object resides on a host different from the link, then all
  576. attributes stored with the link are returned, but not those stored
  577. with the object referenced by the link.
  578.    \item[\lit{\#CACHED}] Return all attributes of type \lit{CACHED}.
  579. If you specify \lit{\#CACHED} with \lit{\#ALL}, the server will return cached
  580. attributes in addition to those that would be returned if you'd just
  581. specified \lit{\#ALL}.  It is not clear how useful this behavior is.
  582.    \item[\lit{\#OBJECT}] Return all attributes of type \lit{OBJECT}.  Note that
  583. this will not work if the object does not reside on the same host as
  584. the link.
  585.    \item[\lit{\#ADDITIONAL}] Return all \lit{ADDITIONAL} attributes
  586.    \item[\lit{\#REPLACEMENT}] Return all \lit{REPLACEMENT} attributes.
  587.    \item[\lit{\#LINK}] Return all \lit{LINK} attributes.
  588.    \item[\lit{\#FIELD}] Return all fields (all system-defined standard
  589. attributes), except for ones that have already been returned as part of
  590. the \lit{LINK} response, such as \atr{host}, \atr{handle}, and
  591. \atr{dest-exp}.
  592.    \item[\lit{\#\#FIELD}] Return all fields.  (This option will be
  593. rarely used.)
  594.    \item[\lit{\#APPLICATION}] Return all application-defined
  595. attributes.
  596. \end{description}
  597. \subsubsection{\protect\lit{FILTER} option}
  598. If the \lit{FILTER} option is specified, the \lit{LIST} command will
  599. be followed by one or more lines representing one or more
  600. \lit{PREDEFINED} filters to
  601. be applied at the server.
  602. The filters are applied in the order in which they follow the
  603. \lit{LIST} command.  Their format is just like that of 
  604. \lit{FILTER} information returned from the \lit{LIST} command (see
  605. subsection~\ref{filter}), except that the \meta{execution-location} field must always
  606. be \lit{SERVER}, and the first four tokens (``\lit{ATTRIBUTE LINK
  607. FIELD FILTER}'') are omitted.  The format is:
  608. \begin{command}
  609.   \lit{FILTER} \meta{filter-type} \lit{SERVER} \meta{pre-or-post}
  610. \lit{PREDEFINED} \meta{filter-name} \\
  611.              \zoos \lit{ARGS} \zoms\meta{filter-arg}\zome \zooe
  612. \end{command}
  613. The server will know that there are no more filter-specifying lines
  614. either when the end of the message is reached or it encounters a line
  615. that does not begin with the token \lit{FILTER}.
  616. \subsection{Returned Information}
  617. On failure, a standard error response will be returned.  On success,
  618. the response will be a sequence of entries containing information
  619. about the requested files.
  620. \subsubsection{Links}
  621. \begin{command}
  622.   \lit{LINK} \meta{link-type} \meta{target} \meta{name-component} \meta{host-type} \meta{host-name} 
  623.     \meta{hsoname-type} \meta{hsoname} \meta{object-version}
  624.      [ \lit{DEST-EXP} \meta{dest-expiration} ]
  625. \end{command}
  626. In the case of links to objects, \meta{dest-expiration} is the value
  627. of the object's \atr{dest-exp} field.  
  628. The \meta{link-type}
  629. token is defined as follows:
  630. \begin{description}
  631. \item[\lit{L}] Normal link (Symbolic link, link to a Prospero object,
  632. or link to an external object)
  633. \item[\lit{U}] Union link to a directory
  634. \end{description}
  635. The \meta{target} token is defined as follows: \label{target-token}(Also see
  636. the discussion of this in section~\ref{target-attribute}.
  637. A link may be a link to an object.  In this case, the value of the
  638. \meta{target} token will be the same as the value of the
  639. object's \atr{base-type} attribute\footnote{For an explanation, see
  640. section~\ref{base type}.}
  641. (that is, \lit{OBJECT}, \lit{FILE},
  642. \lit{DIRECTORY}, or \lit{DIRECTORY+FILE}.)  Other values for
  643. \meta{target} are:
  644. \begin{description}
  645. \item[\lit{SYMBOLIC}] Symbolic link.  The \meta{host-type} token will be
  646.   \lit{VIRTUAL-SYSTEM}, the \meta{host-name} token will be the name of
  647.  the virtual system being linked to (specified as a path within the
  648.  current virtual system --- we usually use the conventional ugly-name of
  649.  the virtual system), the \meta{hsoname-type} will be \lit{ASCII},
  650.  and the \meta{hsoname} will be 
  651.  the full pathname of the object being linked to within the virtual
  652.  system.
  653. \item[\lit{EXTERNAL}] This is a link to an object which is not stored on a
  654. host running Prospero.   Unlike other types of links, \lit{EXTERNAL}
  655. links have an \atr{access-method}%
  656. \footnote{See
  657.  section~\ref{access-method} for a description of the
  658.  \atr{access-method} field.} 
  659. attribute which is returned as a cached attribute.
  660. This is because \lit{EXTERNAL} links
  661. cannot have any object attributes.  Therefore, if one wishes to add
  662. attributes to an \lit{EXTERNAL} link that would normally be object
  663. attributes, one must specify them as \lit{CACHED}, \lit{ADDITIONAL}, or
  664. \lit{REPLACEMENT} attributes.
  665. \end{description}
  666. If the principal requesting the listing has no read access to a link,
  667. all fields in the link except for \meta{name-component} will be
  668. returned with the token \lit{NULL}, which is not otherwise valid in a
  669. returned link.
  670. \subsubsection{Link Attributes\label{Link Attributes}}
  671. If attributes were requested, the link will be followed by lines that
  672. specify the values of the requested attributes.  The form of the
  673. response will depend on whether the attribute is associated with the
  674. link, or with the actual object.  If the attribute is associated with
  675. the link, the \meta{applies-to} token indicates whether it applies to the
  676. \lit{LINK} or the object, and if the object whether it is a \lit{CACHED}
  677. attribute, a \lit{REPLACEMENT} attribute, or an \lit{ADDITIONAL} attribute.  In
  678. case of conflicts between attributes associated with the link and
  679. those associated with the object, a cached attribute is superseded, a
  680. replacement attribute takes precedence, and an additional attributes
  681. leaves both intact.  
  682. Attributes may sometimes be returned even if they were not explicitly
  683. requested.  As a case of this, the \atr{ACCESS-METHOD} attribute is
  684. always returned for \lit{EXTERNAL} links.
  685. \begin{command}
  686.   \ors \lit{ATTRIBUTE} \meta{applies-to} 
  687.     \lit{FIELD} \meta{attribute-name} 
  688.     \ooms\meta{value-tuple-element}\oome%
  689. \metaor \\
  690. \lit{ATTRIBUTE} \meta{applies-to} 
  691.     \ors \lit{APPLICATION} \metaor \lit{INTRINSIC} \ore
  692.     \meta{attribute-name} \meta{attribute-value-type}
  693.     \ooms\meta{value-tuple-element}\oome \ore
  694. \end{command}
  695. \footnote{{\bf CHANGE IN FORMAT}:  It used to be the case that the
  696.   line returned for FIELD attributes did not include an
  697.   \meta{attribute-type} token.  This has been changed.  The older
  698.    format will continue to work until all Prospero applications before
  699. Alpha.5.1 are gone.
  700. Attributes may have multiple values, in which case one \lit{ATTRIBUTE}
  701. line is returned for each value.  In the case of multiple values, the
  702. order in which attributes is returned may be significant to the
  703. application.  The Prospero server will maintain the order
  704. of attributes.  
  705. \meta{attribute-value-type}s are \lit{SEQUENCE},
  706. \lit{LINK}, and \lit{FILTER}.  \lit{SEQUENCE} is the most general
  707. \meta{attribute-value-type}.  It is  a sequence of zero or more ASCII
  708. strings, and all other attribute value types are subtypes of it.
  709. Since application attributes are, by definition, application-specific,
  710. we are not constraining the form of a sequence.  However, if an
  711. application wishes to use application-specific subtypes of
  712. \lit{SEQUENCE}, we encourage application authors to use the first
  713. element of the attribute's value as a keyword describing the particular
  714. subtype of \lit{SEQUENCE}.  
  715. One possible \meta{attribute-value-type} is \lit{LINK}.    The
  716. \meta{value-tuple-element} tokens returned in this case are the same as
  717. the \lit{LINK} response to the \lit{LIST} command. 
  718. In that
  719. case, the \meta{name-component} token will be ignored, and will usually be
  720. a zero-length string (\lit{'{}'}).)  The return format would be:
  721. \begin{command}
  722. \lit{ATTRIBUTE} \meta{applies-to} \lit{APPLICATION} \meta{attribute-name}  
  723.     \lit{LINK} \ors \lit{L} \metaor \lit{U}\ore \meta{target} \meta{name-component} \meta{host-type} \meta{host-name} 
  724.     \meta{hsoname-type} \meta{hsoname} \meta{object-version}
  725.      \zoos \lit{DEST-EXP} \meta{dest-expiration} \zooe 
  726. \end{command}
  727. If the value of an attribute is a link, the link might itself have
  728. attributes.  When such sub-attributes are returned, the word
  729. \lit{ATTRIBUTE} is immediately followed by \lit{>} signs to the
  730. appropriate nexting level.   If a link attribute has sub-attributes,
  731. they will all be sent with the link.
  732. All available \lit{ID} fields will always be returned with
  733. every \lit{LIST} operation, using the \lit{ID} return
  734. format.\footnote{Please note again that ID fields have not been
  735. fully implemented, in the absence of an appropriate standard; comments about them in this document are subject to
  736. change.} 
  737. \subsubsection{Filters\label{filter}}
  738. User-defined attributes and the field \atr{filter} may have the
  739. \meta{attribute-value-type} of \lit{FILTER}.\footnote{
  740.     XXX: This should go into the attribute documentation
  741. }  If a link has one or more filters attached to it, they are
  742. specified as one or more instances of the link's \atr{filter} field.  
  743. One \lit{ATTRIBUTE} line will always be returned for each
  744. filter.  The 
  745. lines are returned in the same order in which the filters will be
  746. applied to the link.  The return format is:
  747. \begin{command}
  748.   \lit{ATTRIBUTE}\zoms\lit{>}\zome \lit{LINK FIELD FILTER} \meta{filter-type}
  749.     \meta{execution-location} \meta{pre-or-post} \\
  750. \ors\lit{PREDEFINED} \meta{filter-name} \\
  751. \metaor\ 
  752.     \lit{LINK} \lit{L} \meta{target} \meta{name-component} \meta{host-type} \meta{host-name} 
  753.     \meta{hsoname-type} \meta{hsoname} \meta{object-version}
  754.      \zoos \lit{DEST-EXP} \meta{dest-expiration} \zooe \ore 
  755.     \zoms\lit{ID} \meta{id} \meta{info}\zome \\
  756.          \zoos \lit{ARGS} \zoms\meta{filter-arg}\zome \zooe
  757. \end{command}
  758. The values for \meta{filter-type} are: \lit{DIRECTORY}, filter is
  759. applied to the 
  760. current directory; \lit{HIERARCHY}, filter is applied to all directories
  761. reachable through the filtered link; \lit{OBJECT} filter is applied to an
  762. object other than a directory; \lit{UPDATE}, filter is applied when
  763. updating the directory.
  764. \meta{execution-location} refers to where the filter will be executed.
  765. Filters are usually executed on the \lit{CLIENT}, but may be executed
  766. on the \lit{SERVER}.
  767. \meta{pre-or-post} is \lit{PRE} if the filter is to be applied before
  768. union links are expanded and \lit{POST} if the filter is to be applied
  769. after union links are expanded.  \lit{POST} is the common case for
  770. client filters.  Server filters must be \lit{PRE} at this time, since
  771. the server does not yet perform remote expansion of union links.
  772. Filters may be \lit{PREDEFINED}, which means that it is expected that
  773. the appropriate client or server will understand the predefined name, or
  774. they may be \lit{LOADABLE}, which means that they are object 
  775. code that will be dynamically linked with the client or
  776. server.\footnote{
  777.  The security issues with loadable filters have
  778.  not yet been fully addressed.  Partly because of this,  right now, all
  779.  implementations except for the VAX implementation will only support
  780.  \lit{PREDEFINED} filters, and even the VAX implementation is not
  781.  configured to support loadable filters unless you specially compile it
  782.  to do so.
  783. There may also be server-specific \lit{PREDEFINED} filters
  784. for special applications (such as Archie).  Their
  785. \meta{execution-location} will always be \lit{SERVER}.
  786. One may specify zero or more arguments to the filter, following the
  787. \lit{ARGS} keyword.
  788. \subsubsection{Unresolved Components}
  789. An \lit{UNRESOLVED} response lists the components of the name that must be
  790. further resolved relative to the immediately preceding \lit{LINK}
  791. response or responses, and is used when not all components of a
  792. multiple-component name were resolved. 
  793. \begin{command}
  794.   \lit{UNRESOLVED} \meta{components}
  795. \end{command}
  796. The text of the \meta{components} must be a proper suffix of
  797. multiple-component name sent across as an argument to the \lit{LIST}
  798. command.  For instance, to the command 
  799. \begin{command}
  800. \lit{LIST '' COMPONENTS ulink-test2/murali/ROOT}
  801. \end{command}
  802. the only two legal \lit{UNRESOLVED} responses are 
  803. \begin{command}
  804.   \lit{UNRESOLVED} \lit{murali/ROOT}
  805.   \lit{UNRESOLVED} \lit{ROOT}
  806. \end{command}
  807. \subsubsection{No files found}
  808. If no files are found, the reply will be:
  809. \begin{command}
  810.   \lit{NONE-FOUND}
  811. \end{command}
  812. \section{LIST-ACL}
  813. \begin{command}
  814. \commandsize
  815. \lit{LIST-ACL} \meta{options} \zoos\meta{name-component}\zooe\selectlines
  816. \end{command}
  817. This request is used to list the access control list for the directory
  818. specified in the previous \lit{DIRECTORY} command, or for a link within the
  819. directory.  The optional component is required only if requesting the
  820. \lit{ACL} for a link within the directory (option = \lit{LINK}).  It is to be left
  821. out when requesting the \lit{ACL} for the directory itself
  822. (option = \lit{DIRECTORY}).    
  823. The response will be zero or more lines of the form:
  824. \begin{command}
  825.   \lit{ACL} \meta{entry-type} \zoos\meta{authentication-type} 
  826.     \zoos\meta{rights} \zoms\meta{principal-name}\zome\zooe\zooe
  827. \end{command}
  828. If no \lit{ACL} entries are listed, then the response is \lit{SUCCESS}.
  829. Fields inappropriate to a particular \meta{entry-type} need not be
  830. sent, but if they are sent, they should be sent as a zero-length
  831. string.  For instance, the \lit{DEFAULT}, \lit{SYSTEM}, and
  832. \lit{DIRECTORY} ACL types do not use the \meta{authentication-type},
  833. \meta{rights}, and \meta{principal-name} fields.
  834. If the ACL's permissions state that it cannot be viewed (\lit{v} or
  835. \lit{V} permission), then the
  836. response is  
  837. \begin{command}
  838.   \lit{FAILURE} \lit{NOT-AUTHORIZED} \zoos\text{optional multi-token explanatory text.}\zooe
  839. \end{command}
  840. Possible values for \meta{entry-type} include \lit{NONE} (allows
  841. access to no principals; in other words, it's a no-op), \lit{ANY}
  842. (grants access to all 
  843. principals), \lit{OWNER} (grants access to the principal specified by
  844. the link or object's \atr{owner} field; i.e., the one who owns the
  845. link or object),  
  846. \lit{NAMED}, %(formerly called \lit{LGROUP}),
  847. \lit{GROUP} (In this case, the \meta{authentication-type} token
  848. represents the group certification method),
  849. \lit{DIRECTORY}, \lit{DEFAULT}, \lit{SYSTEM}, \lit{AUTHENT} (means
  850. that an 
  851. authentication method is used; the \meta{authentication-type} token
  852. specifies the 
  853. authentication method.  The only currently supported value for
  854. \meta{authentication-type} is \lit{KERBEROS}.),  \lit{ASRTHOST}, and
  855. \lit{TRSTHOST}.  An example:  
  856. \begin{command}
  857. ACL ANY '{}' rlvY \\
  858. ACL ASRTHOST '{}' ALRMDI prospero \\
  859. ACL AUTHENT KERBEROS ALRMDI swa@ISI.EDU bcn@ISI.EDU \\
  860. ACL DEFAULT '{}' '{}' \\
  861. ACL SYSTEM '{}' '{}' \\
  862. \end{command}
  863. We interpret a null link ACL as the \lit{DIRECTORY} ACL.  
  864. We interpret a null directory ACL as the \lit{DEFAULT} ACL.
  865. See the Prospero User's Manual for a discussion of the order of
  866. evaluation of ACLs.
  867. If we want to find out the value of a \lit{NAMED} ACL (named ACLs are
  868. shorthand for longer lists, and are local to the server) (\lit{XXX} this
  869. should go into the user's manual), then we use
  870. the \lit{NAMED} option, and the 
  871. \meta{name-component} is replaced with the (possibly quoted) name
  872. of the named ACL.   Note that named ACLs are not currently supported.
  873. If we want to find out the value of an included ACL (Currently, the
  874. only included ACLs are \lit{SYSTEM}, \lit{DEFAULT}, and \lit{OVERRIDE}.  \lit{DIRECTORY} is
  875. also an included ACL for the purposes of the protocol, but the value
  876. of the \lit{DIRECTORY} ACL will change from directory to directory, and
  877. therefore it is not a server-wide stable name.) \footnote{XXX: this
  878. information will go into the user's manual when we revise it}, then we use
  879. the \lit{INCLUDED} option, and the 
  880. \meta{name-component} is replaced with the name
  881. of the included ACL.   Note that retrieval of included ACLs is not
  882. currently supported. 
  883. If we want the ACL for a filesystem object (instead of for a link or
  884. directory), then we use the \lit{OBJECT} option, and the
  885. \meta{name-component} is replaced with \meta{hsoname-type}
  886. \meta{hsoname} \zoos\meta{object-version}\zooe.  Object ACLs are not currently implemented, because
  887. they wouldn't do anything useful --- we currently do not have an
  888. access method which understands Prospero ACLs.
  889. Within the Prospero protocol, the quoting mechanism works on principal
  890. names, and works recursively for distinguishing components of
  891. principal names.  (This is currently only used by Kerberos, but may also
  892. be needed by other authentication mechanisms.)
  893. See the Prospero User's manual for a further discussion of ACLs.
  894. \section{GET-OBJECT-INFO}
  895. \begin{command}
  896. \commandsize
  897. \lit{GET-OBJECT-INFO} \meta{requested-attributes} 
  898. \meta{hsoname-type} \meta{hsoname}
  899. \meta{object-version}\selectlines
  900. \end{command}
  901. This command requests information about an object.
  902. \meta{requested-attributes} is a list of those attributes
  903. that are desired.  Multiple attributes may be separated by ``\lit{+}'' signs
  904. (with no intervening white space), just as options lists are
  905. separated.
  906. Special attribute names may be specified, just as they may be for the
  907. \lit{LIST} command.  The special names are: \lit{\#OBJECT} (synonymous
  908. with \lit{\#ALL}), \lit{\#FIELD}, \lit{\#INTERESTING}, \lit{\#ALL}, and
  909. \lit{\#APPLICATION}. 
  910. The response can be multiple lines, each containing a value for an
  911. attribute.  The response will be the same as for the \lit{ATTRIBUTE}
  912. option to the \lit{LIST} command.  However, the \meta{applies-to}
  913. field will always be \lit{OBJECT}
  914. An object that has migrated to another host may have its
  915. \atr{forwarding-pointer} attribute queried with \lit{GET-OBJECT-INFO},
  916. but attempts to retrieve any other attributes will return a
  917. \lit{FORWARDED} message.
  918. If no matching attributes for the object were found, the response is
  919. \lit{NONE-FOUND}. 
  920. \section{EDIT-OBJECT-INFO}
  921. \begin{command}
  922.   \commandsize
  923.   \lit{EDIT-OBJECT-INFO} \meta{modification-request}
  924. \meta{hsoname-type} \meta{hsoname} 
  925. \end{command}
  926. This command is used to change the attributes of a Prospero object.
  927. It is followed by an arbitrary (zero or more) number of
  928. \lit{ATTRIBUTE} specification lines.  See the
  929. \lit{LIST} command for a definition of these lines.    The
  930. \meta{applies-to} will always be \lit{OBJECT}.
  931. In the command, one may request to add a new instance of an attribute, delete
  932. an instance, delete all instances, or replace all instances.  The
  933. \meta{modification-request} will be \lit{ADD}, \lit{DELETE},
  934. \lit{DELETE-ALL}, or \lit{REPLACE}.  If you want to do more than one
  935. thing to an object in 
  936. the same request (e.g., if you want to add one attribute instance and
  937. replace another), and you want to avoid letting the object exist in an
  938. intermediate and possibly inconsistent state, then you can send two
  939. \lit{EDIT-OBJECT-INFO} commands in the same message, along with the
  940. \lit{ATOMIC} command.
  941. If you are deleting all instances of an attribute, then the
  942. \meta{attribute-value} you specify in your \lit{ATTRIBUTE}
  943. specification lines will be ignored, and will usually just be the null
  944. string.  \lit{DELETE-ALL} just checks for matches on the attribute
  945. name and the attribute namespace (\lit{APPLICATION}, \lit{FIELD}, or
  946. \lit{INTRINSIC}). 
  947. \lit{DELETE}, on the other hand, checks for an exact match on the
  948. attribute name, namespace, type, and value.  (The current
  949. implementation does not check for sub-attributes of a value of type
  950. link.  
  951. \lit{REPLACE} may
  952. be specified even if the attribute does not yet have any instances
  953. specified for it.
  954. One may use \lit{EDIT-OBJECT-INFO} to edit the \atr{base-type}
  955. attribute to remove the \lit{FILE} type from it only if the file is
  956. empty (zero length), and one may remove the \lit{DIRECTORY} type from
  957. it only if the directory is empty (contains no links).
  958. \section{CREATE-LINK}
  959. \begin{command}
  960.   \commandsize
  961.     \lit{CREATE-LINK} \meta{options} \ors \lit{L} \metaor \lit{U} \ore 
  962.     \meta{name-component}
  963. \meta{target} \meta{host-type} \meta{host-name} \meta{hsoname-type}
  964. \meta{hsoname} \meta{object-version}  
  965. \zoos\lit{ID} \meta{id-type} \meta{id-value}\zooe
  966. \end{command}
  967. This command creates a new link in the current directory.   The
  968. \meta{name-component} may not be null, even if the link is a union link.  
  969. If filters
  970. or other information must be added, the \lit{EDIT-LINK-INFO} command should be
  971. used once the link has been created.
  972. The \meta{options} may include \lit{REPLICA} to add
  973. a link to a directory that already contains a link with the same
  974. \meta{name-component}.  \lit{REPLICA}  indicates  that the new link
  975. and the existing link or links with which it conflicts are replicas.
  976. Normally, if one attempts to add a link with a conflicting
  977. \meta{name-component}, the response is: 
  978. \begin{command}
  979. \lit{FAILURE ALREADY-EXISTS}
  980. \end{command}
  981. if the new link duplicates an existing link (if all of the arguments
  982. to it are the same as those of an existing link), and
  983. \begin{command}
  984. \lit{FAILURE NAME-CONFLICT}
  985. \end{command}
  986. if the new link has information which conflicts with an existing link.
  987. If \lit{CONFLICT} is among the options, then conflicting links will be
  988. inserted into the directory anyway.
  989. For directories whose \atr{directory-ordering} is \lit{UNSORTED},
  990. one of these three additional options may be specified:
  991. \begin{description}
  992. \item[\lit{BEFORE}] The \lit{CREATE-LINK} command is immediately
  993. followed by a \lit{LINK} line, describing the link before which the
  994. new link is to be inserted in the directory listing.     
  995. \item[\lit{AFTER}] Same as above, but the new link is inserted after the
  996. specified link rather than before it.
  997. \item[\lit{LAST}]  This is the default.  The new link will be the last
  998. item in the directory. 
  999. \end{description}
  1000. \section{DELETE-LINK}
  1001. \begin{command}
  1002.   \commandsize
  1003.   \lit{DELETE-LINK} \meta{options} \meta{name-component} \selectlines
  1004. \end{command}
  1005. This command is used to remove an entry from a directory.  The options
  1006. are currently blank.
  1007. If the \lit{SELECT} lines are not specified and there are multiple
  1008. links with the same \meta{name-component}, the first one matching will
  1009. be deleted.
  1010. \section{EDIT-LINK-INFO}
  1011. \begin{command}
  1012.   \commandsize
  1013.   \lit{EDIT-LINK-INFO}  \meta{modification-request} \meta{name-component}
  1014.     \zoos\lit{ID} \meta{id-type} \meta{id-value}\zooe  
  1015. \end{command}
  1016. \begin{sloppypar}
  1017. This command modifies information associated with a link.
  1018. The interpretation of the %\ \linebreak[3]
  1019. \meta{modification-request} and of
  1020. subsequent lines is exactly the same as in the \lit{EDIT-OBJECT-INFO} command.
  1021. \end{sloppypar}
  1022. %\vspace{-.1in}
  1023. \section{EDIT-ACL}
  1024. \begin{command}
  1025. \commandsize
  1026. \lit{EDIT-ACL}
  1027.  \ors \lit{LINK+}\meta{options} \meta{name-component} \\
  1028.     \hspace{.6in} \metaor \lit{OBJECT+}\meta{options}
  1029.     \meta{hsoname-type} \meta{hsoname} \\
  1030.     \hspace{.6in} \metaor \lit{DIRECTORY+}\meta{options}
  1031. \ore    \\
  1032.     \zoos\lit{ID} \meta{id-type} \meta{id-value}\zooe \meta{LF} \\
  1033.   \lit{ACL} \meta{entry-type} \meta{authentication-type} \meta{rights}
  1034.      \meta{principal}
  1035. \end{command}
  1036. This command is used to modify an access control list for a directory,
  1037. for a link within a directory, or for an object.  If modifying the ACL
  1038. for a directory or for a link within a directory, the directory is
  1039. specified in the previous \lit{DIRECTORY} command.
  1040. Another option indicates the operations to be
  1041. performed (one of \lit{ADD}, \lit{SUBTRACT}, \lit{INSERT}, \lit{DELETE}, \lit{SET} or \lit{DEFAULT}), and
  1042. whether to override the automatic inclusion of the system
  1043. ACL (\lit{NOSYSTEM}), or limited administer access for the client
  1044. (\lit{NOSELF}).
  1045. The server will return \lit{SUCCESS}, \lit{FAILURE}, or
  1046. \lit{FORWARDED}, as appropriate.
  1047. \section{CREATE-OBJECT}
  1048. \begin{command}
  1049.   \commandsize \ors\lit{CREATE-OBJECT} \lit{PHYSICAL+}\meta{options} 
  1050.         \zoos\meta{hsoname-type} \meta{hsoname}\zooe \\ 
  1051.     \metaor \lit{CREATE-OBJECT} \lit{ADD+}\meta{options}
  1052.         \zoos\meta{hsoname-type} \meta{hsoname}\zooe \\ 
  1053.     \metaor \lit{CREATE-OBJECT} \lit{VIRTUAL+}\meta{options}
  1054.         \meta{name-component}\ore \meta{LF} \\
  1055.     \zoms\lit{ATTRIBUTE}
  1056.     \meta{attribute-specifying-tokens}\meta{LF}\zome \\
  1057.     \zoms\lit{ACL} \meta{ACL-specifying-tokens}\meta{LF}\zome
  1058. \end{command}
  1059. This command will create an object with the specified
  1060. \meta{name-component} and will 
  1061. return the identifier that can be used to open it.   The
  1062. \meta{options} may include any or all of 
  1063. \lit{DIRECTORY}, \lit{FILE}, and \lit{OBJECT}.
  1064. If the \lit{FILE} option is specified, the new file is
  1065. created empty.    If the \lit{DIRECTORY} option is specified, the
  1066. new directory is created empty (i.e., not containing any links.).  
  1067. The object will be created with whatever attributes present that are
  1068. specified in the \lit{ATTRIBUTE} lines.
  1069. If \meta{options} includes \lit{VIRTUAL}, then
  1070. \meta{name-component} is a name relative to the current directory, and a
  1071. link to the new object is added to the current directory.
  1072. If the \lit{ADD} option is specified, then one is adding a base type to
  1073. an already created object.   Exactly one of the \lit{ADD},
  1074. \lit{VIRTUAL}, and \lit{PHYSICAL} options must be specified.
  1075. \begin{sloppypar}
  1076. If the \lit{PHYSICAL} option and a  \meta{hsoname-type}
  1077. \meta{hsoname} pair are specified, then the server will attempt to create an object with that
  1078. \meta{hsoname-type} \meta{handle-pair}.  If the \lit{PHYSICAL} option
  1079. without a following pair is
  1080. specified
  1081. then the server will choose a free \meta{hsoname-type}
  1082. \meta{hsoname} pair.
  1083. \end{sloppypar}
  1084. Upon success, the server will return:
  1085. \begin{command}
  1086. \lit{CREATED} \meta{hsoname-type} \meta{hsoname}
  1087. \end{command}
  1088. It is up to the application to create a link to the new object.  
  1089. \subsection{Specifying Attributes}
  1090. The new object's fields will be set to system defaults, but
  1091. specifying a following series of \lit{ATTRIBUTE} descriptions allows
  1092. the creator of a file to override those defaults, and to specify any
  1093. application-defined attributes.  The form for each \lit{ATTRIBUTE} line is
  1094. the same as that returned by the
  1095. \lit{LIST} command.
  1096. \subsection{ACLs}
  1097. If creating an object with the \lit{VIRTUAL} option, the access
  1098. control list for the new object will initially be a copy of the access control
  1099. list for its containing directory.  If creating an object with the
  1100. \lit{PHYSICAL} option, the access control list for the new object will
  1101. contain the \lit{DEFAULT} ACL and the \lit{SYSTEM} ACL.
  1102. In addition,
  1103. for both options, one or more entries will be automatically added to the ACL
  1104. granting its creator all rights.  The entry authentication type or types
  1105. will be appropriate for whatever the user used to authenticate himself
  1106. or herself.  (Either \lit{AUTHENT} \lit{KERBEROS} or \lit{ASRTHOST} or
  1107. \lit{TRSTHOST}.)
  1108. If the \lit{LPRIV} option is
  1109. specified for a directory, instead of this entry, only those rights needed to 
  1110. allow the creator to set up the directory (list, read, insert, and
  1111. administer) will be added, and (if \lit{VIRTUAL} was specified), only
  1112. if the creator does not already have such rights through the ACL that
  1113. was included from the parent directory.\footnote{If you really want to shoot yourself in the foot, you can
  1114. then call \lit{EDIT-ACL} to remove these few rights.  We will let you
  1115. do this, but we are not making it easy for you.} 
  1116. If \lit{VIRTUAL} was specified, the ACL for the new link will
  1117. by default be empty, which means that the default rights for the
  1118. directory will apply to the link.
  1119. After the ACL entries mentioned above are installed, the ACL
  1120. entries specified as part of the \lit{CREATE-OBJECT} command will
  1121. be added to the front of the list.
  1122. \subsection{Some Error Conditions}
  1123. If the user attempted to set a
  1124. field whose name the server does not recognize, or to set a
  1125. application-defined attribute to a type that the server does not recognize,
  1126. or to set the value of any attribute with a string that the server
  1127. cannot convert into the data type the server expects (e.g., too few
  1128. tokens when setting an attribute of type \lit{LINK}), or to set an
  1129. unrecognized ACL type,
  1130. the response is:
  1131. \begin{command}
  1132. \lit{ERROR} \text{explanatory text}
  1133. \end{command}
  1134. If the user specified an explicit \meta{hsoname-type} and
  1135. \meta{hsoname} with the \lit{PHYSICAL} option, but they were
  1136. already in use, or if the user specified a component with
  1137. \lit{VIRTUAL}, but the component is already in use, the error message is:
  1138. \begin{command}
  1139. \lit{FAILURE} \lit{NAME-CONFLICT} \zoos\text{explanatory text}\zooe
  1140. \end{command}
  1141. \subsection{No \protect\lit{DELETE-OBJECT} command}
  1142. Although there is a \lit{DELETE-LINK} command, there is {\em no \/}
  1143. \lit{DELETE-OBJECT} command.  That's because Prospero objects will have
  1144. their storage reclaimed when their TTL expires (when no link to them
  1145. is refreshed before their expiration date).  At the moment, this
  1146. storage reclamation feature is not implemented.)  \footnote{XXX: This
  1147. feature must be specified.  In addition, we must specify methods for
  1148. refreshing links, garbage collection, and notification of the
  1149. impending demise of objects.}
  1150. \section{UPDATE}
  1151. \begin{command}
  1152.   \commandsize
  1153.   \lit{UPDATE} \meta{options} \lit{COMPONENTS} \zoms\meta{name-component}\zome
  1154. \end{command}
  1155. This command tells the server to check each of the named components in
  1156. the current directory for forwarding pointers.  If the referenced
  1157. object has moved, the link will be updated.  The server will send
  1158. Prospero protocol messages across the network to the targets of links
  1159. to Prospero objects in order to check whether the target of a link has
  1160. moved.   (External links and symbolic links will not be checked.)  If
  1161. no components were specified, all components in the
  1162. directory will be checked.  Each \meta{name-component} may contain
  1163. wild cards.
  1164. On success, the \lit{UPDATE} command returns the
  1165. number of links that were modified.
  1166. \begin{command}
  1167.   \lit{UPDATED} \meta{number} \lit{LINKS}
  1168. \end{command}
  1169. On failure, the \lit{UPDATE} command returns the number of links it
  1170. was unable to update.\footnote{
  1171.     This error message may change in response to future needs.}
  1172. \begin{command}
  1173.   \lit{FAILED TO UPDATE} \meta{number} \lit{LINKS}
  1174. \end{command}
  1175. Wildcards 
  1176. \section{STATUS}
  1177. This command requests the current status of the server.  A humanly
  1178. readable multiple line response is returned.  The response may be
  1179. presented to the user without additional processing.  The response
  1180. must conform to the following requirements so that it may be read by a
  1181. program if desired.
  1182. The first line must include the server's software version
  1183. identification enclosed in parenthesis, and the host name of the
  1184. server.  The name of the host should be the name that appears on local
  1185. links generated by the server; it might not be the primary name of the
  1186. host.  The version identifier must be the first string that appears in
  1187. parenthesis, and the host name must be the string that immediately
  1188. follows the version identifier.
  1189. If a line contains a colon (:), the string preceding the colon
  1190. identifies the meaning of the text that follows the colon.  Reserved
  1191. identifiers include \lit{Contact}, \lit{Started}, \lit{Memory},
  1192. \lit{Data}, \lit{Root}, \lit{AFTP}, \lit{AFS}, and \lit{DB}.  The
  1193. identifiers are case insensitive.  If present, \lit{AFTP} 
  1194. identifies the part of the file system accessible by anonymous \lit{FTP}.
  1195. More than one \lit{DB} line may be present.  A \lit{DB} line may
  1196. contain more than 
  1197. one item on it; if it does, the items must be separated by spaces.
  1198. Each item on a \lit{DB} line is an initial prefix which this particular
  1199. server recognizes to mean that, if this server receives a system-level
  1200. name with this prefix followed by a slash, the remaining contents of
  1201. the line are fed to a database program which translates it into a
  1202. reference to a virtual directory.  
  1203. Other than for the first line of the response, implementations are
  1204. free to add or modify lines that do not contain a colons.  A sample
  1205. status response follows:
  1206. \begin{verbatim}
  1207.        Prospero server (Beta.4.2B) JUNE.CS.WASHINGTON.EDU
  1208.        Requests since startup 4096 (3609+377+2 67+29+0 9 0+0+0 0 3) OF
  1209.        Started: 26-Aug-91 15:14:56 UTC
  1210.        Contact: bcn@cs.washington.edu
  1211.         Memory: 0(118)vl 0(4)at 0(5)acl 0(1)fi 1(1)pr 2(2)pt 0(711)str
  1212.           Data: /u1/vfs/pfsdat
  1213.           Root: /
  1214.             DB: ARCHIE GOPHER(70) GOPHERGW WAIS
  1215.           AFTP: /homes/june/ftp
  1216. \end{verbatim}
  1217. Since the responses to this command are so free in form, it is
  1218. unlikely you would want to send additional requests to the Prospero
  1219. server along with the \lit{STATUS} request, since it would not be easy for a
  1220. program to separate the replies to them from the free-form text.
  1221. \chapter{Standard Responses}
  1222. \section{SUCCESS}
  1223. \begin{command}
  1224. \commandsize
  1225.  \protect\lit{SUCCESS} \zoos\protect\text{identifying-info}\zooe
  1226. \end{command}
  1227. A command that does not generate any output returns this response if
  1228. successful.
  1229. \section{FORWARDED}
  1230. \begin{command}
  1231. \commandsize
  1232. \protect\lit{FORWARDED} \protect\meta{host-type} \protect\meta{host-name}
  1233.     \protect\meta{hsoname-type} \protect\meta{hsoname}
  1234.     \protect\meta{version}      [ \lit{DEST-EXP} \meta{dest-expiration} ] \\
  1235.     \protect\zoms \protect\lit{ID} \protect\meta{id-type} \protect\meta{id-value}\protect\zome
  1236. \end{command}
  1237. This response is returned when the object that is the target of an
  1238. operation has moved.  The client can retry the response using the
  1239. corrected information.
  1240. \section{ERROR}
  1241. \begin{command}
  1242. \commandsize
  1243. \protect\lit{ERROR} \protect\text{text}
  1244. \end{command}
  1245. This response is returned to indicate an error encountered when
  1246. parsing the request.  The error might be a protocol error, or it might
  1247. be the result of the server's inability to recognize a keyword or data
  1248. type. \text{text} describes the error.
  1249. \section{FAILURE}
  1250. \begin{command}
  1251. \commandsize
  1252. \protect\lit{FAILURE} \protect\meta{identifying-info}
  1253.     \zoos\protect\text{optional text} \zooe
  1254. \end{command}
  1255. This response is returned when an operation can not be performed.  The
  1256. defined values for \meta{identifying-info} appear below.
  1257. If present, the \text{optional text} provides additional information
  1258. about the failure.
  1259. \begin{command}
  1260.   \lit{NOT-FOUND} \ors\lit{FILE} \metaor \lit{ACL} \metaor
  1261.     \lit{OBJECT} \metaor \lit{FILTER} \metaor \lit{PARAMETER} \metaor
  1262.     \lit{ATTRIBUTE} \ore \\
  1263.   \lit{ALREADY-EXISTS} \\
  1264.   \lit{NAME-CONFLICT} \\
  1265.   \lit{AUTHENTICATION-REQUIRED} \\
  1266.   \lit{NOT-A-DIRECTORY} \\
  1267.   \lit{NOT-AUTHORIZED} \\
  1268.   \lit{AUTHENTICATION-DATA} \\
  1269.   \lit{SERVER-FAILED}\footnote{This is used in the following
  1270.     situations, among others: if
  1271.     an internal table in the server fills up, or if the server cannot
  1272.     allocate enough memory to handle the request, or if the server detects
  1273.     an internal inconsistency in its database, or if the server
  1274. has not implemented a command specified in the protocol.}\\
  1275.   \lit{AMBIGUOUS} \\
  1276.   \lit{BAD-VALUE} \\
  1277.   \lit{FILTER-APPLICATION} \\
  1278. \end{command}
  1279. \section{WARNING}
  1280. \begin{command}
  1281. \commandsize
  1282. \protect\lit{WARNING} \protect\meta{identifying-info}
  1283.     \zoos\protect\text{optional text}\zooe
  1284. \end{command}
  1285. This response is returned to indicate a warning condition which does
  1286. not affect the correctness of the response.  This message can be used
  1287. to indicate that the client is using an old version of the protocol
  1288. that, while supported, should be phased out.  It can also be used to
  1289. inform the client of future changes on the server or scheduled
  1290. downtime.  The defined values for \meta{identifying-info} appear
  1291. below.  \text{optional text} is optional text that provides additional
  1292. information about the warning.
  1293. \begin{command}
  1294.   \lit{OUT-OF-DATE} \\
  1295.   \lit{MESSAGE} \\
  1296.   {\em Any \meta{identifying-info} that can follow a \lit{FAILURE} message}
  1297. \end{command}
  1298. Prospero clients are strongly encouraged to present warnings to the user.
  1299. \appendix
  1300. \chapter{Directory, Link, and Object Attributes\label{db}}
  1301. This appendix describes the object and directory information
  1302. maintained by the Prospero file system.
  1303. {\bf \large Please note that this appendix is in very rough
  1304. form.  Many of the attribute definitions have not yet been properly
  1305. written.  A lot of the attribute documentation can be found in
  1306. section~\ref{Link Attributes} of this document.}
  1307. Attributes have three namespaces
  1308. associated with them: \lit{APPLICATION} attributes, \lit{INTRINSIC}
  1309. attributes, and \lit{FIELD}s.
  1310. Attributes in the \lit{FIELD} namespace have a registered meaning, and
  1311. are understood by all clients and servers that use them.
  1312. \lit{APPICATION} attributes are defined by users and application
  1313. programs and are unrestricted.  Intrinsic attributes have special
  1314. registered meanings, providing prossibly transient or derived
  1315. information.  The server has flexibility about whether it allows you
  1316. to change these things.  Modifying them may have special implications
  1317. --- for instance, setting the \atr{SIZE} of a file to 
  1318. ``\lit{0 bytes}'' will truncate the file.  \lit{INTRINSIC} attributes
  1319. gare either not modifiable, or else the server uses special mechanisms
  1320. to modify them.
  1321. In addition, there is a fourth namespace used internally by routines
  1322. running on the Prospero server.   \lit{INTERNAL} attributes are never
  1323. sent across the network; they cannot be read with GET-OBJECT-INFO or
  1324. LIST and cannot be modified with EDIT-OBJECT-INFO.  However, they do
  1325. appear in the server's data files.
  1326. \section{Objects}
  1327. \subsection{Attributes\label{access-method}}
  1328. Valid attributes include {\sc access-method,
  1329. closure, description, forwarding-pointer, keywords, last-referenced,
  1330. last-writer, locks, owner, replicas, size, storage-location, ttl,
  1331. ttl-expires.  version-number, virt-sys, well-known-names,} and {\sc
  1332. write-date}.
  1333. Prospero maintains the following system defined attributes for each
  1334. Prospero object:
  1335. \begin{description}
  1336. \item[\atr{base-type}] See section~\ref{base type} for a description of
  1337. this attribute.
  1338. \footnotetext{
  1339.   {\bf RATIONALE}: Under the version 1 protocol, the means of obtaining the
  1340.   access method information for \lit{EXTERNAL} and \lit{FILE} links was
  1341.   different; this made the code more complicated than it needed to be.
  1342.   The reader may well ask why the host should be specified in
  1343.   the value of the \atr{access-method} field.  Isn't the host name
  1344.   already specified in the \atr{host} field?    Including the host
  1345.   name as part of the attribute's value has some advantages:
  1346.   \begin{itemize}
  1347.   \item The value of the \atr{access-method} field is all one needs in
  1348.   order to retrieve the file.  
  1349.   \item One might have a Prospero server running on only one host in a
  1350.   cluster, where the objects themselves are actually stored on another
  1351.   fileserver.  Then, one would want to be able to have the
  1352.   \atr{access-method} host be different from the host which is listed
  1353.   as the one having the final word on the status of the object.
  1354.   \item This system also allows us to have a gateway server, which is able to
  1355.   translate directory formats from other distributed file systems (e.g.,
  1356.   gopher), but directs the client to retrieve the files themselves from
  1357.   a host that is not the gateway server.
  1358.   \end{itemize}
  1359. \item[\atr{access-method}\footnotemark]
  1360. This is a tuple of at least 5 elements.  The first element is the name
  1361. of the access method.  Currently supported values are \lit{AFTP}, \lit{GOPHER},
  1362. \lit{AFS}, \lit{NFS}, \lit{FTP}, \lit{WAIS}, and \lit{LOCAL}. 
  1363. The next 2 elements are the \meta{host-type} and \meta{host-name} of
  1364. the host to which the access method should connect in order to
  1365. retrieve the object.  A port number may be included as part of the
  1366.  hostname, if relevant.   If they are zero-length tokens (\lit{'{}'}), then
  1367. they default to the \meta{host-type} and \meta{host-name} specified in
  1368. the link.  The next 2 elements are the \meta{hsoname-type} and
  1369. \meta{hsoname} which the access method will use to retrieve the
  1370. object.  If they are zero-length tokens, then they default to the
  1371. \meta{hsoname-type} and \meta{hsoname} specified in the link.
  1372. This constraint on format applies to all access methods.  If a
  1373. particular type of access method doesn't need one of these fields,
  1374. then it still must be specified, but the access method is free to ignore it.  The whole
  1375. point of the \lit{'{}'} shorthand is merely to save bytes in the
  1376. protocol messages.  It is always appropriate to send them fully
  1377. expanded, and not use the \lit{'{}'} shorthand.
  1378. The sixth and subsequent elements are dependent upon the particular
  1379. access method.  For \lit{AFTP} and \lit{FTP}, the sixth element will be
  1380. \lit{BINARY} or \lit{TEXT}.  For \lit{NFS}, the sixth
  1381. element will be the name of the filesystem on the remote host.
  1382. \lit{LOCAL}, and \lit{AFS} have only five-element names.
  1383. The \lit{GOPHER} access method may have five or six elements in the
  1384. name.  The actual protocol used to retrieve a document or object
  1385. through Gopher varies depending on its Gopher item-type.  (See
  1386. Internet RFC 1436 for details on the interpretation of the Gopher
  1387. item-type characters.).  This item type is usually the 1st character
  1388. of a Gopher document or object's selector string (the \meta{hsoname}
  1389. element of the access method).  However, the protocol does not require
  1390. that this be the case.  If a sixth token is present in a \lit{GOPHER}
  1391. access method, it will be treated as the Gopher item-type character;
  1392. otherwise, the item-type will be taken from the 1st character of the
  1393. \meta{hsoname} element.
  1394. Some examples: 
  1395. \begin{command}
  1396. \tt \sloppy ATTRIBUTE FIELD ACCESS-METHOD GOPHER 
  1397. %\linebreak[2]
  1398. INTERNET-D~MERMAID.MICRO.UMN.EDU(150)
  1399. ASCII~\mbox{'1/Fun Stuff/Pyrotechnics/PyroGuide\ 1'}%
  1400. \footnote{This file recently
  1401.     disappeared from the server.  If you have a copy, please send it to
  1402.     \verb"swa@isi.edu".} 
  1403. {\rm \par This access method could also be displayed in the six-token
  1404. format as:}
  1405. \tt \sloppy ATTRIBUTE FIELD ACCESS-METHOD GOPHER 
  1406. %\linebreak[2]
  1407. INTERNET-D~MERMAID.MICRO.UMN.EDU(150)
  1408. ASCII~\mbox{'1/Fun Stuff/Pyrotechnics/PyroGuide\ 1'}~1%
  1409. \footnote{This file recently
  1410.     disappeared from the server.  If you have a copy, please send it to
  1411.     \verb"swa@isi.edu".} 
  1412. {\rm \par Andrew File System names are the same irrespective of what host
  1413. one is using them from.  Therefore, the \meta{host-name} token in the
  1414. access method is irrelevant and is ignored by the client.}
  1415. ATTRIBUTE FIELD ACCESS-METHOD AFS DUMMY DUMMY
  1416. ASCII~\mbox{/grand.central.org/doc/afs/dce/usenix90/README}
  1417. {\rm \par This file can be retrieved by NFS mounting the {\tt /auto/gum/gum}
  1418. filesystem on the host PROSPERO.ISI.EDU.  Note that the server is
  1419. responsible for knowing which client machines it will allow to NFS
  1420. mount that filesystem.}
  1421. ATTRIBUTE FIELD ACCESS-METHOD NFS INTERNET-D~PROSPERO.ISI.EDU
  1422.     ASCII~\mbox{ftp/pub/prospero/README-prospero-documents}
  1423.      \mbox{/auto/gum/gum}
  1424. {\rm \par \meta{hsoname} tokens in the \lit{FTP} access method are full
  1425. local hostname paths that one would give when using full FTP to the host.}
  1426. ATTRIBUTE FIELD ACCESS-METHOD FTP INTERNET-D~PROSPERO.ISI.EDU
  1427.     ASCII~\mbox{/ftp/pub/prospero/README-prospero-documents} TEXT
  1428. {\rm \par \meta{hsoname} tokens in the \lit{AFTP} access method are
  1429. pathnames relative to the root of the anonymous FTP area.}
  1430. ATTRIBUTE FIELD ACCESS-METHOD AFTP INTERNET-D~PROSPERO.ISI.EDU
  1431.     ASCII~\mbox{/pub/prospero/README-prospero-documents} TEXT 
  1432. {\rm If one is querying from a host which has a file accessible via
  1433. the local filesystem, and if the server has knowledge of this fact, a
  1434. \lit{LOCAL} access method will also be returned for a file.  For the
  1435. \lit{LOCAL} access method, the \meta{host-name} token in the access
  1436. method is ignored.}
  1437. ATTRIBUTE FIELD ACCESS-METHOD LOCAL '' ''
  1438.     ASCII~\mbox{/auto/gum/gum/ftp/pub/prospero/README-prospero-documents}
  1439. \end{command}
  1440. \item[\atr{closure}]  The \meta{attribute-type} of thie attribute is
  1441. \lit{LINK}.  It is a link to the virtual system to be
  1442. used when resolving names embedded in the object.  The link's
  1443. \meta{name-component} will be ignored, but by convention it is the
  1444. ugly-name of the virtual system.
  1445. \item[\atr{owning-virtual-system}]  The \meta{attribute-type} of this
  1446. attribute is \lit{LINK}.  It is a link to the description of the
  1447. virtual system which is considered to own the object.  (Every virtual
  1448. system, by convention, has a link to its description named
  1449. \lit{/VS-DESCRIPTION}.   For directories, if you are logged into
  1450. the directory's \atr{owning-virtual-system}, then if you try to change
  1451. the directory, your client will assume that you really want to try to
  1452. change the directory.  If you are logged into a different virtual
  1453. system from the directory's \atr{owning-virtual-system}, then if you
  1454. try to change the directory, your client will assume that you really
  1455. want to customize your own virtual system, but not affect the master
  1456. directory.  Your intentions are completely distinct from whether you
  1457. actually have write permission on the directory.  If you try to change
  1458. a directory that you can't write to (if its \atr{owning-virtual-system} is
  1459. the same as the virtual system you're logged into, but you don't have
  1460. permission to write to it), then the current clients will all give you
  1461. a ``permission denied'' error message, and the nice ones will suggest
  1462. that you might want to change virtual systems and customize instead.
  1463. The link's \meta{name-component} will be ignored, but by convention it is the
  1464. ugly-name of the virtual system.
  1465. \item[\atr{version-number}] The \meta{attribute-type} of this
  1466. attribute is \lit{SEQUENCE}.  It is represented in the protocol as a
  1467. decimal number.  It is currently always zero; see section~\ref{object
  1468. version numbers} for further details.
  1469. \item[\atr{owner}] The principal responsible for the object.  The
  1470. \meta{attribute-type} of this attribute is \lit{SEQUENCE}.  It is a tuple
  1471. of three or more elements.  The first element is an ACL
  1472. \meta{entry-type} and the second element is an ACL
  1473. \meta{authentication-type}.  The third and subsequent elements are
  1474. \meta{principal-name}s.  The first two elements are needed because
  1475. they indicate the namespace in which the \meta{principal-name}s are to
  1476. be resolved.  There may be multiple instances of the \atr{owner}
  1477. field, if the owner wants to be registered according to several
  1478. authentication systems.  For instance, one of the authors of this
  1479. document uses an \atr{owner} field that looks like this:
  1480. \begin{command}
  1481. \lit{ATTRIBUTE FIELD OWNER ASRTHOST '' swa@128.9.*.*} \\
  1482. \lit{ATTRIBUTE FIELD OWNER AUTHENT KERBEROS swa@ISI.EDU swa/padmin@ISI.EDU} \\
  1483. \end{command}
  1484. Although the \atr{owner} field may be referred to with the \lit{OWNER}
  1485. ACL type, we don't really encourage people to use it as a shorthand
  1486. for granting access rights.  Its primary purpose is informational.
  1487. \item[\atr{forwarding-pointer}]  This attribute has type \lit{LINK}.
  1488. The link's \meta{target} is \lit{FP}.   It is set for objects that
  1489. have migrated to another host.  The target of its value is the new
  1490. location of the object.  If an object has moved to a new host,
  1491. its \atr{forwarding-pointer} will be returned in a \lit{FORWARD}
  1492. protocol message in response to any attempts to access it.
  1493. \item[Last writer, write date, etc.] 
  1494. \item[Version info] (optional).  Number of versions to keep,
  1495. version number, etc. 
  1496. \item[Attributes or keywords] (optional).  User specified.
  1497. \item[Short description] (optional). 
  1498. \item[Locks] (optional).
  1499. \item[List of replicas] (optional).  
  1500. \item[Replication type] (optional).  
  1501. \item[Other replication information] (optional).  
  1502. \item[Time to live].  The lifetime for newly created or refreshed
  1503. links to the object.  
  1504. \item[\atr{ttl-expires}]  This is the \atr{ttl} plus the
  1505. time that a link to the object was last created or refreshed.
  1506. \item[Back links].  A possibly incomplete list of directories
  1507. with links to the object.
  1508. \end{description}
  1509. Note that the object's name is not one of its attributes.  The
  1510. object's name is the concatenation of the name components starting from the
  1511. active virtual system.  An object may have different names in
  1512. different virtual systems, or even multiple names within a single
  1513. virtual system\footnote{Despite this, well known names from agreed
  1514. upon starting points might be entered as application-defined attributes for
  1515. objects.}.
  1516. \subsection{Objects stored on \unix}
  1517. Objects stored on \unix\ servers have the following attributes defined
  1518. for them.  These are all \lit{INTRINSIC}:
  1519. \begin{description}
  1520. \item[\atr{size}] A single-element \lit{SEQUENCE} specifying the
  1521. number of bytes used to store the object.  Its format is
  1522. ``\meta{number} \lit{bytes}''.  Note the embedded space.
  1523. \item[\atr{native-owner}]  A single-element \lit{SEQUENCE}.  The
  1524. \unix\ username on the server of the user who owns this file.
  1525. \item[\atr{native-owner}]  A single-element \lit{SEQUENCE}.  The
  1526. \unix\ group name on the server of the group associated with this
  1527. file.
  1528. \item[\atr{last-modified}] A single-element \lit{SEQUENCE}.  The
  1529. ASN-TIME representation of the last modified time of this object.
  1530. \item[\atr{unix-modes}] A single element \lit{SEQUENCE} consisting of
  1531. a ten character string.  The first character is ``\lit{l}'' for
  1532. symbolic links, and ``\lit{-}'' otherwise.  The remaining 9 characters
  1533. are the user, group, and other protection bits in the standard format
  1534. returned by ``\lit{ls -l}''.
  1535. \end{description}
  1536. \subsection{Persistence}
  1537. An object continues to exist until the last non-expired link
  1538. referencing the object is removed.  If a user wishes to recover the
  1539. storage space for an object, it is flagged for removal.  When links to
  1540. the object are refreshed, notification is sent that the object is
  1541. about to disappear, and anyone wanting to maintain their reference
  1542. must copy the object elsewhere.  Subsequent users have the option of
  1543. making their own copy, or updating their link to refer to one of the
  1544. new copies.
  1545. \subsection{Mobility}
  1546. Objects may move from one site to another.  If they do, a forwarding
  1547. pointer must remain at the old location until the time-to-live
  1548. expires.  This enables anyone with a non-expired link to the object to
  1549. refresh the link and record the object's new location.\footnote{To
  1550. place a forwarding pointer, set the old object's
  1551. \atr{FORWARDING-POINTER} atribute.  It must be manually moved to the
  1552. new server at this time.}
  1553. \section{Directories}
  1554. A directory is an object and as such, everything that applies to
  1555. objects also applies to directories.  The physical representation of
  1556. a directory is interpreted by the Prospero server on the system
  1557. storing the directory.  The Prospero protocol defines the interface
  1558. through which a directory is accessed.
  1559. \subsection{Directory Attributes}
  1560. The following attributes are defined for directories:
  1561. \begin{description}
  1562. \item[\atr{directory-ordering} (not yet implemented)]  This attribute
  1563. is a 3-tuple.  The 
  1564. default value is 
  1565. \begin{command}
  1566. \lit{SORTED NAME-COMPONENT INCREASING}
  1567. \end{command}
  1568. which means that, by default, directory entries are sorted in increasing
  1569. order according to the value of their \atr{name-component}
  1570. attribute.
  1571. The first element of the tuple is \lit{SORTED} or \lit{UNSORTED}.  If
  1572. \lit{UNSORTED}, the next two elements must be null.  If \lit{SORTED},
  1573. the second field specifies an attribute which is the sort key.  The
  1574. third element is either \lit{INCREASING} or \lit{DECREASING}, meaning
  1575. the order of sorting.%
  1576. \footnote{In the current implmentation, the only sort keys
  1577. that may be specified must have an \meta{attribute-type} of
  1578. \lit{ASCII}.}
  1579. If the \atr{include-native} attribute is set to any value other than
  1580. \lit{NONATIVE}, then the \atr{directory-ordering} cannot be
  1581. \lit{UNSORTED}.
  1582. \item[\atr{include-native} (not yet implemented)] Whether to include
  1583. information from the native filesystem in the directory.  If files are
  1584. included, they will be included from the real directory on the server
  1585. with the same \meta{hsoname} as the Prospero directory.  Its
  1586. \meta{attribute-type} is a single-element \lit{SEQUENCE}.  
  1587. Values are:
  1588. \begin{description}
  1589. \item[\lit{NONATIVE}] Do not include files from native directory.
  1590. \item[\lit{INCLNATIVE}]  Include all files from native directory.
  1591. \item[\lit{INCLREAL}]    Smae as above, but (for the \unix\  server) do not
  1592. include ``\lit{.}'' and ``\lit{..}''.
  1593. \item[\lit{NATIVEONLY}] All entries in directory are from native dir;
  1594.     no links have been added.  For the \unix\  server, ``\lit{.}'' and
  1595. ``\lit{..}'' are NOT included. 
  1596. \item[\lit{PSEUDO}] Directory is not real.  This is set for all
  1597. directories returned from filters and by Archie and Gopher.
  1598. \end{description}
  1599. \end{description}
  1600. \subsection{Link Attributes\label{target-attribute}}
  1601. Prospero directories contain links to the objects that are included in
  1602. the directory. The following information is maintained for each link.
  1603. \begin{description}
  1604. \item[\atr{name-component}] This is the single component of the
  1605. object's path relative to the current directory.  Its
  1606. \meta{attribute-type} is \lit{SEQUENCE}.
  1607. \item[Short description of link] (Optional).
  1608. \item[\atr{link-type}].  The type of a link can be either 
  1609. normal [L] or union [U].  In the case of a normal link, an entry for
  1610. the link is visible when the directory is listed.  In the case of a
  1611. union link, which can only be made to another directory, the links
  1612. from the target directory appear as part of the directory from which
  1613. the union link originates when the originating directory is listed.
  1614. If multiple objects have the same name, the order in which the union
  1615. links appear determines which object is visible.
  1616. Two types of links which may appear locally (either in the server, or
  1617. on the client) are [-] deleted, and [N] native.  It is not legal for
  1618. these codes to be sent across the network.  Type [N] links are
  1619. converted to [L] and type [-] are skipped entirely.
  1620. \item[\atr{target}]  Target of link:  For links in a directory that
  1621. don't point to objects, could be \lit{SYMBOLIC} or \lit{EXTERNAL}. For a
  1622. forwarding pointer it is \lit{FP}.  Links to objects will have a target
  1623. field indicating the cached value of the object's \atr{BASE-TYPE}
  1624. attribute.  When stored on a vlink structure, it may have exactly one
  1625. of the following forms: \lit{OBJECT}, \lit{FILE}, \lit{DIRECTORY},
  1626. \lit{DIRECTORY+FILE}.  There is no guarantee that the type of the target
  1627. has not changed.  Thus, this field is the cached value of the object's
  1628. base type.  For union links, this field is always \lit{DIRECTORY} or
  1629. \lit{DIRECTORY+FILE}.  See section~\ref{target-token} for a further
  1630. discussion of this.
  1631. \item[Hidden/Not-Hidden/Externally-Hidden\footnote{Not yet implemented}]
  1632. By default, a hidden 
  1633. link is not displayed when a directory is listed.  It is, however,
  1634. returned by the directory server, and is traversed if the actual name
  1635. is specified in a pathname.  An Externally-Hidden link is a hidden
  1636. link that will be displayed if the current virtual system is the same
  1637. as the owning virtual system for the directory containing the link.
  1638. The user may override the hidden option, causing hidden links to be
  1639. listed. Note that it is also possible to hide a link by
  1640. specifying its protection as non-listable.  Such links will {\bf only}
  1641. be returned by the directory server when the actual name of the link
  1642. has been specified.
  1643. \item[\atr{filter}] Multiple filters
  1644. allowed.  The filter attribute is a pointer to a program that can be
  1645. used to filter the contents of directories to which links are made.
  1646. {\it data} is the set of optional arguments passed to the filter
  1647. program.  In addition to the linked directory and arguments, the
  1648. filter has access to all other information available from the current
  1649. directory.
  1650. Filters come in several types.  By default, a filter is a directory
  1651. filter, and is applied when searching directories.  A hierarchy filter
  1652. is similar to a directory filter.  The difference is that a directory
  1653. filter is applied to a single directory, while a hierarchy filter is
  1654. applied to the entire hierarchy (including subdirectories) reached
  1655. through a link.  Directory and hierarchy filters come in two types.
  1656. The default is post-expansion.  The filter is applied after all union
  1657. links have been expanded.  A pre-expansion filter is applied before
  1658. union links are expanded.  An object filter is applied when accessing
  1659. an object other than a directory, and might be used, for example, to
  1660. cause some operation to be performed on the object before it is
  1661. accessed.  Note, however, that all types of filters are associated
  1662. with links.
  1663. Filters are applied to a directory in the order of pre-or post
  1664. expansion, decreasing depth of the links to which they are attached
  1665. (for hierarchy filters), and finally in the order that the filters are
  1666. specified on the traversed links.
  1667. \item {\bf Attributes} (optional).  Application attributes to be
  1668. associated with the link.  This allows a user or application to add
  1669. (or override) attributes to the linked object (which might be owned by
  1670. someone else, and thus not modifiable).
  1671. \item[\atr{host}] The name of the host on which the
  1672. object can be found. 
  1673. \item[\atr{host-type}]  The type of
  1674. the hostname.  In particular, whether the hostname is an Internet
  1675. address, a domain style name, or a name in some other naming system.
  1676. Note that a symbolic link is a link where the destination host is a
  1677. virtual system, and the destination object name is a name relative to
  1678. that virtual system.
  1679. \item[\atr{hsoname}] Host-specific object name. The name of the object
  1680. relative to the destination system.  
  1681. \item[\atr{hsoname-type}] The
  1682. type of \atr{hsoname}. Different types of names include numerical file IDs,
  1683. names relative to the root of the local file system, etc.  Right now,
  1684. only pathnames are implemented, and their type is \lit{ASCII}.
  1685. \item[\atr{object-version}] By specifying a version number
  1686. in a directory link, the link is made to a specific version of the
  1687. object, and changes to the object will not be visible through the
  1688. link.
  1689. \item {\bf Access control info} (optional). Allows restrictions on who can
  1690. read or modify individual directory entries.  These are really
  1691. attributes, though they are in fact retrieved and modified with LIST-ACL and
  1692. EDIT-ACL, and do not appear on the normal attribute listings.
  1693. \item[\atr{dest-exp}] {\bf Destination expiration date and time}.  Its
  1694. implied type is a single-element {\tt SEQUENCE}, in ASN-TIME format.\footnote{
  1695.     Implementers should use the {\tt asntotime()} function in the
  1696. {\tt pfs} library in order to convert an ASN-TIME string into a
  1697. \unix\  timestamp, and the {\tt timetoasn()} function to perform the
  1698. reverse conversion.  Applications writers are encouraged to use
  1699. ASN-TIME format to represent all timestamps sent across the network.
  1700. This entry indicates how long 
  1701. the information in the link should be considered valid.  When an
  1702. object is accessed through a link, the destination expiration date
  1703. should be set to the current time plus the destination time-to-live.
  1704. Note that expired directory entries do not disappear.  Typically they
  1705. remain valid.  The expiration means that there is no longer a
  1706. guarantee that the object originally referenced can still be found.
  1707. \item {\bf ID}.  When a new object is created, a unique
  1708. object identifier may be assigned.  This identifier can be included in
  1709. links, and used to further verify that the named object is the one
  1710. that is actually desired.  It allows one to reference objects after
  1711. their expiration dates with the guarantee that if these identifiers
  1712. match, it is the same object.  In the prototype, the object identifier
  1713. is a random number of type REMOTE.  Other types of object identifiers
  1714. will be defined after more work is done by an IETF working group.
  1715. \item {\bf Valid-till} (optional).  If a link is a cached value, then
  1716. this field indicates how long the entry should be considered valid.
  1717. For example, a symbolic link may have a corresponding cached hard
  1718. link.  Until its expiration a cache entry may be used instead of
  1719. searching based on the symbolic link.  If this field is 0, then the
  1720. link is not a cached entry.
  1721. \item {\bf Last-update} (optional).  This is the time the link was
  1722. last updated.  Its expected use is for resolving conflicting updates
  1723. in replicated directories.
  1724. \end{description}
  1725. \subsection{Replication}
  1726. When support for replication is added to Prospero, a directory might
  1727. include multiple links with the same name for the same object. Not all
  1728. replicas need be listed, however, because each replica will maintain
  1729. its own list of siblings.  Multiple entries are important to increase
  1730. reliability and availability.
  1731. \chapter{Asynchronous Reliable Delivery Protocol\label{ardp}}
  1732. This appendix describes the asynchronous reliable delivery protocol
  1733. (ARDP) used by Prospero.  As used by Prospero, this protocol is
  1734. layered on top of the Internet User Datagram Protocol. 
  1735. % \cite{udp}.
  1736. Prospero implements its own ARDP because at the time of initial
  1737. development we were unable to find any that were suitable for general
  1738. use.  Most systems that use any sort of reliably delivered message
  1739. protocol implement their own around the specific needs of their
  1740. application.  Like these other systems, early versions of the Prospero
  1741. protocol defined the mechanisms needed for retries and packet
  1742. sequencing.  As these mechanisms were refined, the functionality was
  1743. moved to a separate protocol layer (and is implemented as a separate
  1744. library) to improve modularity, and in hope that this general and
  1745. simple ARDP can be used for other purposes.
  1746. The ARDP protocol is designed for a request/response style of
  1747. interaction, where a client sends a request message to a server in one
  1748. fell swoop and receives a reply message from the server.  The server
  1749. can send the packets composing the reply message slowly, as data
  1750. becomes available, while it is still processing the rest of a reply.
  1751. In the current implementation, each request message sent by a machine
  1752. from a particular port has its own connection id.
  1753. ARDP was designed so that in the common case, the additional overhead
  1754. of guaranteeing reliability is as small as possible.  Unless special
  1755. processing is required, the header is kept small, and unless a packet
  1756. is lost, no additional packets are sent.  If a field is not specified,
  1757. the default value is used in its place.  All fields up to and
  1758. including the last field specified must be filled in, but the header
  1759. may be truncated at any point, after which all remaining fields take
  1760. on their default values.  The ARDP header contains the following
  1761. fields:
  1762. \begin{description}
  1763. \item[Octet 0] Version and header length: High order two bits are ARDP
  1764. version number mod 4 (this is version 0). Low order six bits are the
  1765. header length including octet 0.\footnote{The length of the total
  1766. packet, including data, is available via the UDP layer, as are the
  1767. port and IP address of the sending host.}
  1768. \item[Octets 1--2] Connection ID: Defaults to zero.  It must be
  1769. specified in the response to any request that specified a non-zero
  1770. connection ID.
  1771. \item[Octets 3--4] Packet number: Defaults to 1 if not specified. A specified
  1772. value of 0 indicates an unsequenced control packet which should not
  1773. be passed to the application.   Note that unsequenced control packets
  1774. cannot request acknowledgements, nor is there any way for the sender
  1775. of such a packet to be sure that they have arrived.
  1776. \item[Octets 5--6] Total number of packets in this message:   Defaults
  1777. to 0 if not known, or retains current value if it was provided in any
  1778. earlier messages.  If the packet number was also not specified, then
  1779. it defaults to 1.  A specified value of 0 means use the default.
  1780. \item[Octets 7--8] Received through:   Sequence number through which
  1781. all packets have been received by the sender of this packet.  Defaults
  1782. to current value if specified in previous message. Defaults to 0
  1783. otherwise.  The recipient's count of packets received through is
  1784. normally monotonically increasing; this keeps the count from being set
  1785. backwards in case an out-of-order packet is received.  However, if the
  1786. ``reset received through'' option (option 2) is specified in octet 12, then it
  1787. means reset to 0 (i.e. it forgot or lost the earlier messages).  More
  1788. generally, specifying any explicit value for this field along with the
  1789. ``reset received through'' option resets the peer's count, possibly
  1790. backwards.  The recipient should not set its internal value of this
  1791. field backwards unless the ``reset received through'' option is set.
  1792. \item[Octets 9--10] Wait (expected time till response): Defaults to
  1793. current value. Specified value of 0 means revert to client-specified
  1794. backoff algorithm.  Specifying a non-zero value lets the
  1795.     client know that a request might not be processed for some time and
  1796. that the client should not retry the request until the specified time.
  1797. The client may retry sooner if it believes
  1798. messages are available which have been missed (e.g., gaps in the list
  1799. of received packets).  This is an unsigned
  1800. quantity, measured in seconds, in network octet order (i.e., octet 9 is
  1801. more significant than octet 10).  A specified value of 65,535
  1802. (\(\mbox{FFFF}_{16}\); 
  1803. all bits turned on) means greater than or equal to 65,535 seconds
  1804. until the next packet.  (We do not expect that this value will ever be
  1805. used, but it is defined for the sake of completeness.)   
  1806. \item[Octet 11] Flags: Octet 11 is a bit vector specifying option flags.
  1807. The flags may themselves require additional
  1808. fields specific to the flag.  These fields appear at the end of the
  1809. header in the order they are needed when reading flags from the low
  1810. order bit to the high order bit, followed by any extra fields needed
  1811. by the flag specified by the 12th octet.  
  1812. %% It does not appear to be possible to start a \lit{MINIPAGE} inside
  1813. %% a \lit{TABULAR} environment.  LaTeX is really awful about not permitting
  1814. %% recursive application of its constructs.  I wish there were
  1815. %% something better out there.  --swa
  1816. %% & \begin{minipage}
  1817. \end{description}
  1818. %\begin{table}[h]
  1819. \begin{center}
  1820. \begin{tabular}{|l|p{3.5in}|p{2.0in}|}
  1821. \multicolumn{3}{c}{Value of flags for octet 11} \\ \hline
  1822. Bit No. & Meaning & Additional Fields \\ \hline
  1823. 0 (low order) & Additional Address Information Follows & 
  1824.     Variable length (see below)\\ \hline 
  1825. 1       & Priority Follows & 2 octets (see below)\\ \hline
  1826. 2 & A Protocol ID for a higher-level protocol follows & 
  1827.     2 octets (see below) \\ \hline
  1828. 3--5    & Unused & \\ \hline
  1829. 6       & This packet is a sequenced control packet only; it should
  1830. not be returned to the application by the ARDP library. & None \\ \hline
  1831. 7 (high order) & Please Acknowledge this Packet & None \\ \hline
  1832. \end{tabular}
  1833. \end{center}
  1834. %\end{table}
  1835. \begin{description}
  1836. \item[Octet 12] More Options:  Octet 12 specifies exactly one (1)
  1837. of up to 256 other options.  The options may themselves require additional
  1838. fields specific to the options.  (See discussion at Octet 11).  
  1839. \end{description}
  1840. %\begin{table}[h]
  1841. \begin{center}
  1842. \begin{tabular}{|l|p{3.0in}|p{3.0in}|}
  1843. \multicolumn{3}{c}{Value of options for octet 12} \\ \hline
  1844. Value   & Meaning       & Additional Fields \\ \hline
  1845. 0       & No Option Specified & None            \\ \hline
  1846. 1       & Client to server: Cancel Request.  Server to client:
  1847. Connection refused. & None                 \\ \hline
  1848. 2       & Reset peer's received-through count. 
  1849.     & Specified in octets 7--8 \\ \hline
  1850. 3       & Packets received beyond received-through
  1851.       & The rest of the    
  1852. header after additional data for octet 11 flags is an arbitrary
  1853. number of octets.  These are bit-vectors specifying which packets
  1854. beyond the received-through specified in this packet have been
  1855. received by the sender of this packet.  For example, if the
  1856. received-through is set to 43, then we know that packet 44 has not
  1857. been received.  The low order bit of the first octet of the additional
  1858. field will be turned on if packet 45 has been received, and off if it
  1859. has not.  The high-order bit will be turned on if packet 52 has been
  1860. received, and off if it has not.  Similarly, the low-order bit of the
  1861. second octet of additional information will be turned on if packet 53
  1862. h as been received, and so on.  The recipient of this information may
  1863. choose to ignore it and use a simpler resend strategy.  Similarly,
  1864. this information is never required to be sent. \\ \hline
  1865. 4       & Redirect (used by servers): The client should send any
  1866. unacknowledged packets 
  1867. already sent and all subsequent packets in this message to a new
  1868. addresss.  This is designed to be used as a load-shedding device.  In
  1869. one common case, this will be the entire response a server gives to a request,
  1870. and the client will resend the entire request to a new server; in
  1871. the other common case, this will be used in conjunction with option 6
  1872. or 7.
  1873.     & 6 octets.  The first 4 octets are the IP address of the new server,
  1874. in network byte order.  The next 2 octets are the UDP port to which
  1875. the request should be sent, also in network byte order. \\ \hline
  1876. 5       & Redirect and notify (used by servers).  Like option 4, but
  1877. the client's network layer should also notify its caller that all
  1878. subsequent requests intended for the old server should be sent to the
  1879. new server instead.  & Same as option 4. \\ \hline
  1880. 6       & Forwarded: This request was received from a
  1881. client, and the sender is a server forwarding it to the recipient for
  1882. processing.   The recipient should pretend that it received this
  1883. message from the sender indicated by the additional fields, not from
  1884. the real sender of this message.  (If implemented, this request should be accepted only
  1885. from one of a group of trusted hosts.)   This option is intended to be
  1886. used by a central server which distributes requests to several subsidiary
  1887. servers which do the actual work of processing the request, but which
  1888. use the central server as  a contact point.  Presumably, it is cheaper
  1889. for the central server to forward the request to the subsidiary
  1890. servers over a local area network rather than for the client (who may
  1891. be quite far away) to retransmit it.    The central server has done
  1892. the job of notifying the original client (through option 4 or 5) that
  1893. further requests and retransmissions should go to the new server.
  1894.     & 6 octets: The IP address and port of the original sender of
  1895. this message, as in number 4. \\ \hline 
  1896. \end{tabular}
  1897. \begin{tabular}{|l|p{3.0in}|p{3.0in}|}
  1898. \multicolumn{3}{c}{Value of options for octet 12} \\ \hline
  1899. 7       & Forwarded; Please notify: Like option 6, but the receiving
  1900. server should notify the client of the switch (through option 4 or 5).%
  1901. \footnotemark
  1902.     & 6 octets: The IP address and port of the original sender of
  1903. this message, as in number 4. \\ \hline 
  1904. 8-252  & Undefined                     & Undefined \\ \hline
  1905. 253     & Request Queue Status & 1 octet.  If bit 0 (low order) is
  1906. set, the position in the queue is requested.  If bit 1 is set, the
  1907. estimated time until this request will be completed is requested.  The
  1908. recipient may ignore this option.  \\ \hline
  1909. 254     & Response to 253.  & 1 octet of flags, followed by 1 or 2 additional
  1910. fields.  If bit 0 (low order) of the flags is set, the position in the
  1911. queue is returned as a 2 octet network byte order representation of an
  1912. unsigned quantity.  A value of  \hexnum{FFFF} (all bits turned on) means 
  1913. a queue position of \hexnum{FFFF} or further.  (We do not expect this
  1914. value to ever be used, but it is included for the sake of
  1915. completeness.)  If bit 1 of the flags is set, the estimated 
  1916. time until this request will be completed is returned as a  4-octet
  1917. network byte order unsigned value, representing a time in seconds.  A
  1918. value of \hexnum{FFFFFFFF} (all bits turned on) means a time of
  1919. \hexnum{FFFFFFFF} seconds or more.  (We do not expect this to ever be 
  1920. used). \\ \hline
  1921. 255     & Reserved for future expansion & Undefined \\ \hline
  1922. \end{tabular}
  1923. \end{center}
  1924. \footnotetext{You might think that the recipient needs to worry
  1925. about the IP address of the FORWARD message it sends to the original
  1926. client being different from that of the original server (the sender of
  1927. this message).  However, this is not the case.  The existence of
  1928. multi-homed hosts means that the sender of a message cannot assume
  1929. that the IP address of a reply (as recorded in the UDP packet
  1930. encapsulating the response it receives) is the same as the address the
  1931. packet was sent to.  The sender must use the connection ID to match up
  1932. sent messages and received replies.}
  1933. %\end{table}
  1934. \begin{description}
  1935. \item[Octets 13 and above] Fields specific to particular flags and options.
  1936. First, additional data fields  specific to the flags in octet 11
  1937. should be specified. 
  1938. \item[Next Octets] Additional Address Information (if Additional
  1939. Address Information flag specified):  The first octet specifies the
  1940. type of additional address information.  The next octet specifies the
  1941. length of the address information, from 0 to 255 octets.\footnote{The
  1942. entire 255 octets are not available for address information, since they
  1943. are part of the header, and the maximum header length header is
  1944. limited to 64 octets.}
  1945.   Its length
  1946. does not include the two octets that specify type and length.   The following
  1947. octets contain the address information itself, and its format is
  1948. dependent upon the type of address information.  
  1949. \item[Next 2 octets] Priority (if Priority flag specified):
  1950. These octets are a signed integer representing the priority of the
  1951. request.  Not all implementations understand this message, and many
  1952. that do will not honor requests for expedited handling.  Negative
  1953. numbers indicate expedited handling while higher numbers indicate
  1954. greater delays.  A priority of 0 is normal.
  1955. \item[Next 2 octets] Protocol ID (if Protocol ID flag specified):
  1956. These octets identify the interpretation of the data carried in the
  1957. packet.  The default, or an explicitly specified value of 0,  mean
  1958. that it is not specified, but has been agreed upon externally (i.e.
  1959. the applications will know). 
  1960. \item[Next octets] Any data specific to the option set by octet 12
  1961. should be specified.  This is the data specified in the ``additional
  1962. fields'' column of the table ``Value of flags for octet 12.''
  1963. \end{description}
  1964. \chapter{Prospero Conventions\label{conventions}}
  1965. \section{\protect\meta{hsoname}s}
  1966. There are some special \meta{hsoname}s that the current Prospero
  1967. server may recognize, if it has been configured appropriately.  If an
  1968. \meta{hsoname} begins with the string \lit{AFTP/}, it is interpreted
  1969. as a path relative to the anonymous FTP directory on that server.  If
  1970. an \meta{hsoname} begins with the string
  1971. \lit{GOPHER}\zoos\lit{(}\meta{gopher-port-number}\lit{)}\zooe, it is
  1972. interpreted to refer to GOPHER data files on that host .  If an
  1973. \meta{hsoname} begins with the string \lit{GOPHER-GW}, it refers
  1974. to GOPHER data files on another host.  If an \meta{hsoname}
  1975. begins with the string \lit{ARCHIE/}, it represents an Archie database
  1976. query.
  1977. \chapter{Prospero Protocol Changes from Version 1 to Version 5}
  1978. Versions 2, 3, and 4 of the Prospero protocol were not used.  The
  1979. protocol number jumped from version 1 to version 5 to keep the
  1980. software number and version number consistent; the first version of
  1981. the server to implement version 5 protocol had a software version
  1982. number of 5.
  1983. For now, all Prospero servers continue to accept Version 1 of the
  1984. protocol.
  1985. Not all of the protocol changes are listed here.
  1986. In version 1, the \lit{EDIT-LINK-INFO} command was called \lit{MODIFY-LINK}.
  1987. The syntax of the arguments has also been changed.
  1988. The method of specifying attributes to \lit{LIST} has changed.  The
  1989. lines returned from \lit{LIST} are also in a new format.
  1990. The quoting mechanism has been formalized, and extended to apply to
  1991. multiple-component directory names.  Therefore, the \lit{ONECOMP}
  1992. option to \lit{LIST} is now officially dead (it was never implemented
  1993. in any server anyway).  Note that no Version 1 server ever implemented
  1994. quoting properly anyway.  Therefore, if a client speaks Version 1
  1995. Protocol, it will not be able to access filenames with spaces in them.
  1996. The \meta{magic-no} field has been replaced with zero or more
  1997. occurrences of the sequence \lit{ID} \meta{id-type} \meta{id-value}.
  1998. \lit{GET-OBJECT-INFO} used to have the reserved keyword \lit{ID}, but
  1999. this has been flushed.
  2000. The syntax of the arguments of
  2001. \lit{EDIT-OBJECT-INFO} has been changed, in order to avoid a syntactic
  2002. amgiguity.   
  2003. Many changes have occurred to the arguments of commands.  
  2004. Filter syntax has changed drastically.  
  2005. Separate principals are now sent as separate protocol tokens in ACL
  2006. and attribute definitions.
  2007. The \atr{target} field used to have a possible value of
  2008. \lit{SYM-LINK}.  This has been changed to \lit{SYMBOLIC}.  The
  2009. \atr{base-type} field has been introduced.
  2010. The syntax of a \meta{target} of \lit{EXTERNAL} has changed
  2011. radically.  EXTERNAL links now look a lot more like conventional links.
  2012. The meaning of the \atr{access-method} attribute has changed radically;
  2013. it's now a lot more flexible.
  2014. Support for Kerberos has been specified.
  2015. \end{document}
  2016.